Skip to main content
Back to React

<SharedFlowList />

The SharedFlowList component lists the flows shared with an organization unit, the flows it owns, or both. Selecting a flow reports it through onSelect, so your application decides what to open, for example <FlowVariablesForm /> for that flow.

Usage​

src/DelegatedAdmin.jsx
jsx
import { useState } from 'react'
import { SharedFlowList, FlowVariablesForm } from '@thunderid/react'

function DelegatedAdmin({ ouId }) {
const [selection, setSelection] = useState()
const flowId = selection?.ouId === ouId ? selection.flowId : undefined

return (
<>
<SharedFlowList ouId={ouId} selectedFlowId={flowId} onSelect={(flow) => setSelection({ ouId, flowId: flow.id })} />
{flowId && <FlowVariablesForm key={`${ouId}:${flowId}`} flowId={flowId} ouId={ouId} />}
</>
)
}
note

The component must be rendered within ThunderIDProvider. The access token of the signed-in user needs the permissions the server requires to list flows.

Props​

SharedFlowList accepts the props below and every BaseSharedFlowList prop except error, flows, isLoading, offset, onPageChange, and totalResults, which it manages.

PropTypeRequiredDefaultDescription
ouIdstringYesThe organization unit to list the flows of.
ownership'shared' | 'owned' | 'all'No'shared'Which flows to list: the ones shared with the unit, the ones it owns, or both.
flowTypestringNoRestricts the list to one flow type, for example AUTHENTICATION.
limitnumberNo20Page size.

Ownership and Paging​

The server cannot filter a flow list by ownership. For shared and owned, the component reads the unit's flows, up to 100, and filters on each flow's isOwnedByOU value in the browser, then pages through the matches. A unit with more than 100 flows therefore lists matches from the first 100 flows only. For all, the component pages on the server and has no such limit.

BaseSharedFlowList​

BaseSharedFlowList is the presentational table. It holds no data of its own: pass the page of flows and handle selection and pagination. The table shows each flow's name, handle, and type.

PropTypeRequiredDefaultDescription
flowsManagedFlow[]YesThe page of flows to show.
totalResultsnumberNoflows.lengthTotal number of flows, used for pagination.
limitnumberNo20Page size.
offsetnumberNo0Offset of the current page.
onPageChange(offset: number) => voidNoCalled with the offset of the page to show. Pagination is hidden when omitted.
onSelect(flow: ManagedFlow) => voidNoCalled when a flow is chosen. Rows are selectable only when set.
selectedFlowIdstringNoIdentifier of the flow to highlight.
isLoadingbooleanNofalseShows a loading state.
errorstring | nullNonullAn error message to show in place of the rows.
titlestringNoHeading of the list. Pass an empty string to hide it.
descriptionstringNoText under the heading.
actionsReactNodeNoControls rendered next to the title.
classNamestringNoCSS class for the root element.
preferencesPreferencesNoInternationalization preferences.
children(props: BaseSharedFlowListRenderProps) => ReactNodeNoRenders custom UI in place of the default table.

The children render function receives the flows (also available as rows), the default columns, the isLoading and error state, limit, offset, totalResults, onPageChange, onSelect, and selectedRowId.

Internationalization​

The column headings, empty message, and error message come from the admin.flows.list keys in the SDK's translations, available in all nine locales. Override them through preferences.i18n. See Internationalization.

Explore with AI

ThunderID LogoThunderID Logo

Product

DocsAPIsSDKs
© Copyright Linux Foundation Europe.For web site terms of use, trademark policy and other project policies please see https://linuxfoundation.eu/en/policies.