Refine Sider Modification
I'm working on a Refine project using Material UI and facing a particular challenge. I need to add a custom link in the default sidebar (Sider) that leads to a new page. This page isn't based on a standard resource like in typical Refine usage, but I want to maintain the sidebar's standard features, such as active page highlighting.
As far as I understand, there are a couple of ways to customize the Sider:
Using the Sider's render prop.
Swizzling the entire Sider component for deeper customization.
However, I'm seeking a simpler method. I'd like to add this custom link while keeping all the default themes and functionalities of Refine intact. I'm a bit hesitant to use swizzle as it might require ongoing manual updates, which I'd like to avoid.
The functionality I need for my custom page includes two search bars that fetch data from my database, send this data to my backend to perform calculations, and then display a list based on those results. I'm wondering if there's a way to integrate this into Refine without defaulting to a standard resource list. Is it possible to use a resource but modify its initial behavior to suit my custom input and backend processing needs, rather than triggering an immediate list fetch?
To sum up, I'm looking for an easy way to add a link to the Sider that retains all default functionalities but doesn't rely on a resource. Alternatively, could I customize a resource so that it doesn't immediately trigger a fetch, but instead allows for a POST request with two entities, and then returns a list based on the calculation?
Note: I am using the simple REST default.
Any guidance or suggestions on this would be really appreciated, especially in terms of maintaining the default styling and functionality of Refine.
Thanks in advance for your help!
As far as I understand, there are a couple of ways to customize the Sider:
Using the Sider's render prop.
Swizzling the entire Sider component for deeper customization.
However, I'm seeking a simpler method. I'd like to add this custom link while keeping all the default themes and functionalities of Refine intact. I'm a bit hesitant to use swizzle as it might require ongoing manual updates, which I'd like to avoid.
The functionality I need for my custom page includes two search bars that fetch data from my database, send this data to my backend to perform calculations, and then display a list based on those results. I'm wondering if there's a way to integrate this into Refine without defaulting to a standard resource list. Is it possible to use a resource but modify its initial behavior to suit my custom input and backend processing needs, rather than triggering an immediate list fetch?
To sum up, I'm looking for an easy way to add a link to the Sider that retains all default functionalities but doesn't rely on a resource. Alternatively, could I customize a resource so that it doesn't immediately trigger a fetch, but instead allows for a POST request with two entities, and then returns a list based on the calculation?
Note: I am using the simple REST default.
Any guidance or suggestions on this would be really appreciated, especially in terms of maintaining the default styling and functionality of Refine.
Thanks in advance for your help!
