systematic-tanS
Refine2y ago
3 replies
systematic-tan

Can Show and Edit components pass custom meta to the buttons ?

Is it possible to pass meta to the buttons, besides rewriting the entire rendering ?
What I am doing now is the following;
    <Show
      isLoading={isLoading}
      headerButtons={({ refreshButtonProps, editButtonProps, deleteButtonProps, listButtonProps }) => (
        <Box display="flex" flexDirection="row" alignItems="center">
          <ListButton {...listButtonProps} meta={meta} />
          <EditButton {...editButtonProps} meta={meta} />
          <DeleteButton {...deleteButtonProps} meta={meta} />
          <RefreshButton {...refreshButtonProps} meta={meta} />
        </Box>
      )}
    >

But this is so redundant and verbose, is there an easier way ?
Was this page helpful?