Skip to content

Commit

Permalink
fix type problem
Browse files Browse the repository at this point in the history
  • Loading branch information
maciaszczykm committed Oct 18, 2024
1 parent ae142e1 commit 8efe291
Showing 1 changed file with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ export function EditPluralOIDCClientsModal({
)
}

type TableMetaT = {
instanceName: string
useModalOverlay?: boolean
}

const columnHelper = createColumnHelper<OidcProviderFragment>()

const columns = [
Expand Down Expand Up @@ -105,6 +110,7 @@ const columns = [
meta: { gridTemplate: 'max-content' },
cell: function Cell({ row: { original: provider }, table }) {
const [editOpen, setEditOpen] = useState(false)
const { instanceName, useModalOverlay } = table.options.meta as TableMetaT

return (
<>
Expand All @@ -116,8 +122,8 @@ const columns = [
<EditPluralOIDCClientModal
open={editOpen}
onClose={() => setEditOpen(false)}
instanceName={table.options.meta?.instanceName}
useModalOverlay={table.options.meta?.useModalOverlay}
instanceName={instanceName}
useModalOverlay={useModalOverlay}
provider={provider}
/>
</>
Expand Down Expand Up @@ -179,7 +185,9 @@ export function EditPluralOIDCClients({
isFetchingNextPage={loading}
onVirtualSliceChange={setVirtualSlice}
reactVirtualOptions={DEFAULT_REACT_VIRTUAL_OPTIONS}
reactTableOptions={{ meta: { instanceName, useModalOverlay } }}
reactTableOptions={{
meta: { instanceName, useModalOverlay } as TableMetaT,
}}
style={{
border: 'none',
borderBottomLeftRadius: 0,
Expand Down

0 comments on commit 8efe291

Please sign in to comment.