You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I want to navigate to the list page of the posts resource, to do that I need to do something like this:
import{useNavigation}from"@refinedev/core";import{Link}from"react-router-dom";exportconstMyComponent=()=>{const{ listUrl }=useNavigation();return<Linkto={listUrl("posts")}>Go to posts list</Link>;};
It would be easier to use if the <Link /> component accepts resource as a prop and resolves the path automatically.
Describe the thing to improve
The <Link /> component can take a go prop and use useGo to create the path. This way, I can use all useGo features and easily handle resource links.
import{Link}from"@refinedev/core";exportconstMyComponent=()=>{return(<Linkgo={{to: {resource: "posts",action: "list",},query: {filters: [{operator: "eq",value: "published",field: "status",},],},}}>
Go to the posts list
</Link>);};
The text was updated successfully, but these errors were encountered:
alicanerdurmaz
changed the title
[FEAT] Navigate to resource with <Link /> component.
[FEAT] Create a <Link /> component to navigate to a given resource.
Sep 13, 2024
Is your feature request related to a problem? Please describe.
I want to navigate to the list page of the
posts
resource, to do that I need to do something like this:It would be easier to use if the
<Link />
component acceptsresource
as a prop and resolves the path automatically.Describe the thing to improve
The
<Link />
component can take ago
prop and useuseGo
to create the path. This way, I can use alluseGo
features and easily handle resource links.The text was updated successfully, but these errors were encountered: