Navigation not properly working if the resource has custom route
Hi, I am using react-router-6, We have configured a resource with a route called '/config/units'. when using edit function from useNavigation, it redirecting to
http://config/units/edit...
instead of http://localhost:3000/config/units/edit/...
5 Replies
fair-rose•3y ago
Hey @msp5608,
Can you share us your code to learn how you use
useNavigation
?eastern-cyanOP•3y ago
Sorry, I just figured out what was the issue. we should have put the options like
instead of this
But we are facing another issue, I am using useForm inside edit page
We are using hasura data provider
It is returning the following - {
"errors": [
{
"extensions": {
"code": "validation-failed",
"path": "$.selectionSet.organization_units_by_pk.selectionSet"
},
"message": "missing selection set for 'organization_units'"
}
]
}
the fields provided in metadata are not added in the query
fair-rose•3y ago
the
organization_units
didn't provide in your metaData
but you say it's provided. Are you adding it elsewhere?eastern-cyanOP•3y ago
it is the resource name
even if i added the resource name, getting the same result
we are using useModalforms elsewhere, it is working fine
only the useForm is not fetching the data using metadata fields
fair-rose•3y ago
It's interesting that it works in
useModalForm
and not useForm
. Are you sure that the codes are exactly the same? Because useModalForm
internally uses useForm
.