diff --git a/www/src/components/overview/clusters/plural-cloud/EditPluralOIDCClient.tsx b/www/src/components/overview/clusters/plural-cloud/EditPluralOIDCClient.tsx
index 67f7babad..7d7bd7fe8 100644
--- a/www/src/components/overview/clusters/plural-cloud/EditPluralOIDCClient.tsx
+++ b/www/src/components/overview/clusters/plural-cloud/EditPluralOIDCClient.tsx
@@ -25,12 +25,14 @@ export function EditPluralOIDCClientModal({
instanceName,
provider,
insideModal = false,
+ refetch,
}: {
open: boolean
onClose: () => void
instanceName: string
provider?: OidcProviderFragment
insideModal?: boolean
+ refetch: () => void
}) {
return (
)
@@ -51,9 +54,11 @@ export function EditPluralOIDCClientModal({
function EditPluralOIDCClient({
onClose,
provider,
+ refetch,
}: {
onClose: () => void
provider?: OidcProviderFragment
+ refetch: () => void
}) {
const theme = useTheme()
const [name, setName] = useState(provider?.name ?? '')
@@ -92,7 +97,8 @@ function EditPluralOIDCClient({
const onCompleted = useCallback(() => {
// TODO: How to show client ID and client secret?
onClose()
- }, [onClose])
+ refetch()
+ }, [onClose, refetch])
const [mutation, { loading, error }] = !provider
? useCreateProviderMutation({ variables: { attributes }, onCompleted })
diff --git a/www/src/components/overview/clusters/plural-cloud/EditPluralOIDCClients.tsx b/www/src/components/overview/clusters/plural-cloud/EditPluralOIDCClients.tsx
index 0720aa5fb..15abaf527 100644
--- a/www/src/components/overview/clusters/plural-cloud/EditPluralOIDCClients.tsx
+++ b/www/src/components/overview/clusters/plural-cloud/EditPluralOIDCClients.tsx
@@ -73,6 +73,7 @@ export function EditPluralOIDCClientsModal({
type TableMetaT = {
instanceName: string
insideModal?: boolean
+ refetch: () => void
}
const columnHelper = createColumnHelper()
@@ -110,7 +111,8 @@ const columns = [
meta: { gridTemplate: 'max-content' },
cell: function Cell({ row: { original: provider }, table }) {
const [editOpen, setEditOpen] = useState(false)
- const { instanceName, insideModal } = table.options.meta as TableMetaT
+ const { instanceName, insideModal, refetch } = table.options
+ .meta as TableMetaT
return (
<>
@@ -125,6 +127,7 @@ const columns = [
instanceName={instanceName}
insideModal={insideModal}
provider={provider}
+ refetch={refetch}
/>
>
)
@@ -141,7 +144,7 @@ export function EditPluralOIDCClients({
}) {
const theme = useTheme()
const [createOpen, setCreateOpen] = useState(false)
- const { data, loading, pageInfo, setVirtualSlice, fetchNextPage } =
+ const { data, loading, pageInfo, setVirtualSlice, fetchNextPage, refetch } =
useFetchPaginatedData(
{ queryHook: useOidcProvidersQuery, keyPath: ['oidcProviders'] },
{}
@@ -183,7 +186,7 @@ export function EditPluralOIDCClients({
onVirtualSliceChange={setVirtualSlice}
reactVirtualOptions={DEFAULT_REACT_VIRTUAL_OPTIONS}
reactTableOptions={{
- meta: { instanceName, insideModal } as TableMetaT,
+ meta: { instanceName, insideModal, refetch } as TableMetaT,
}}
style={{
border: 'none',