Skip to content

Commit

Permalink
indicate whether EditPoolModal is fetching attached nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
ericwang401 committed Nov 12, 2023
1 parent 81f6418 commit c28294d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions resources/scripts/components/admin/ipam/EditPoolModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ const EditPoolModal = ({ pool, onClose, mutate }: Props) => {
const { clearFlashes, clearAndAddHttpError } = useFlashKey(
`admin.addressPools.${pool?.id}.update`
)
const { data: nodes } = useAddressPoolNodesSWR(pool?.id ?? -1, {})
const { data: nodes, isLoading: isLoadingNodes } = useAddressPoolNodesSWR(
pool?.id ?? -1,
{}
)

const schema = z.object({
name: z.string().min(1).max(191),
Expand Down Expand Up @@ -105,7 +108,7 @@ const EditPoolModal = ({ pool, onClose, mutate }: Props) => {
byKey={`admin.addressPools.${pool?.id}.update`}
/>
<TextInputForm name='name' label={tStrings('name')} />
<NodesMultiSelectForm />
<NodesMultiSelectForm loading={isLoadingNodes} />
</Modal.Body>

<Modal.Actions>
Expand Down

0 comments on commit c28294d

Please sign in to comment.