-
Notifications
You must be signed in to change notification settings - Fork 272
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
In a PR (#2434) converting a Dialog component to Typescript rendered as a child of SimpleListPage
component was forced to set the onClose
prop to optional, because in SimpleListPage
we clone the passed Dialog component and then append the onClose property to props.
We should think about setting onClose
to required for our Dialog components, which would require SimpleListPage
to accept a Component instead of a JSX.Element.
E.g.
<SimpleListPage
createForm={<RotationCreateDialog />}
/>
would change to
<SimpleListPage
createDialogComponent={RotationCreateDialog}
/>
and we could add a render prop option, too, if some components need to pull off some shenanigans in scope as well:
<SimpleListPage
renderCreateDialog={(props) => <RotationCreateDialog foo={bar} {...props} />}
/>
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request