manual-pink
manual-pink4mo ago

filters in url route

I am loading my default route for a table, however the filters are being added in the url route by default, when no filters are applied. how can I stop this?
5 Replies
kapa.ai
kapa.ai4mo ago
Hi @G. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Hmm, I don't know enough to give you a confident answer yet. The extracts provided do not cover information about handling or preventing filters from being added to the URL route by default when no filters are applied. For detailed guidance on managing URL routes or any specific configurations related to filters and URL behavior in refine, I recommend consulting the official refine documentation or seeking advice in the refine community forums or discussions. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai4mo ago
<@140656141196722176> kapa.ai is still learning and improving, please let us know how it did by reacting below
fair-rose
fair-rose4mo ago
Hello @G, for me to understand better, can you share with us filters and url please?
manual-pink
manual-pink4mo ago
url:
http://localhost:5173/Bids?pageSize=10&current=1&filters[0][field]=SKU&filters[0][operator]=contains&filters[0][value]=&filters[1][field]=Description&filters[1][operator]=contains&filters[1][value]=&filters[2][field]=BidNumber&filters[2][operator]=contains&filters[2][value]=&filters[3][field]=Client&filters[3][operator]=contains&filters[3][value]=
http://localhost:5173/Bids?pageSize=10&current=1&filters[0][field]=SKU&filters[0][operator]=contains&filters[0][value]=&filters[1][field]=Description&filters[1][operator]=contains&filters[1][value]=&filters[2][field]=BidNumber&filters[2][operator]=contains&filters[2][value]=&filters[3][field]=Client&filters[3][operator]=contains&filters[3][value]=
filters: {
initial: [
{
field: "SKU",
operator: "contains",
value: "",
},
{
field: "Description",
operator: "contains",
value: "",
},
{
field: "BidNumber",
operator: "contains",
value: "",
},
{
field: "Client",
operator: "contains",
value: "",
},
],
filters: {
initial: [
{
field: "SKU",
operator: "contains",
value: "",
},
{
field: "Description",
operator: "contains",
value: "",
},
{
field: "BidNumber",
operator: "contains",
value: "",
},
{
field: "Client",
operator: "contains",
value: "",
},
],
Hoping I can have the filters not show as part of the default route for this page
fair-rose
fair-rose4mo ago
Thanks @G , unfortunately thats not possible right now. If you want, you can open feature request on GitHub 🙌 I agree with you. empty values should not appear in route