added spin to expand icon
parent
ffe42d2a74
commit
238e19af2a
|
@ -1,4 +1,4 @@
|
|||
import { InfoCircleOutlined, PlusOutlined } from "@ant-design/icons";
|
||||
import { CaretRightOutlined, PlusOutlined } from "@ant-design/icons";
|
||||
import {
|
||||
Avatar,
|
||||
Button,
|
||||
|
@ -192,6 +192,17 @@ function Service({
|
|||
|
||||
useEffect(() => fetchServiceActivities(), [isOpen]);
|
||||
|
||||
const expandIcon = ({ isActive }) => {
|
||||
if (isRequestingActivities) return <Spin size="small" />;
|
||||
|
||||
return (
|
||||
<CaretRightOutlined
|
||||
rotate={isActive ? 90 : 0}
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
{notificationContextHolder}
|
||||
|
@ -199,6 +210,7 @@ function Service({
|
|||
<Collapse
|
||||
key={service.service_id}
|
||||
onChange={(e) => setIsOpen(e.length !== 0)}
|
||||
expandIcon={expandIcon}
|
||||
items={[
|
||||
{
|
||||
key: "1",
|
||||
|
|
Loading…
Reference in New Issue