Confirmation dialog for action
Some actions support confirmation dialog out of the box. For instance you can enable confirmation dialog for
DeleteButton just by passing undoable={false}Ā
When you need confirmation for your custom button (or any other action), you can leverage
Confirm dialog component exported from react-admin package.There is another example in bulkActionButtons section of RA documentation.
Make FunctionField sortable
Technically, you can omit theĀsourceĀ andĀsortByĀ properties for theĀ<FunctionField>Ā since you provide the render function. However, providing aĀsourceĀ or aĀsortByĀ will allow theĀDatagridĀ to make the column sortable, since when a user clicks on a column, theĀDatagridĀ uses these properties to sort. Should you provide both,ĀsortByĀ will overrideĀsourceĀ for sorting the column.
So without
source it will work as it should but the list won't be sortable by status.Display read only field in SimpleIteratorForm
<SimpleFormIterator>Ā only acceptsĀInputĀ components as children. If you want to use someĀFieldsĀ instead, you have to use aĀ<FormDataConsumer>Ā to get the correct source
Ā