Refresh
<RefreshButton>
uses Material UI <Button>
component to update the data shown on the page via the useOne
method provided by your dataProvider
.
You can swizzle this component to customize it with the refine CLI
Usage
Properties
recordItemId
recordItemId
allows us to manage which data is going to be refreshed.
Clicking the button will trigger the useOne
method and then fetches the record whose resource is "post" and whose id is "1".
<RefreshButton>
component reads the id information from the route by default.
resource
resource
allows us to manage which resource is going to be refreshed.
Clicking the button will trigger the useOne
method and then fetches the record whose resource is "categories" and whose id is "2".
<RefreshButton>
component reads the resource name from the route by default.
hideText
It is used to show and not show the text of the button. When true
, only the button icon is visible.
resourceNameOrRouteName
deprecated
resourceNameOrRouteName
resourceNameOrRouteName
prop is deprecated. Useresource
prop instead.
resourceNameOrRouteName
allows us to manage which resource is going to be refreshed.
Clicking the button will trigger the useOne
method and then fetches the record whose resource is "categories" and whose id is "2".
<RefreshButton>
component reads the resource name from the route by default.
API Reference
Properties
It also accepts all props of Material UI Button.