-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Arrays in query params #46
Comments
Hello. Can you provide a reproduction for your problem? |
Yep, of course. I've attempted the following, but it doesn't work. const filters = reactive({
someFilterName: useRouteQuery("some-query", [], {
fromQuery(value) {
return value.split(",");
},
toQuery(value) {
return value.join(",");
},
}),
});
function addValueToSomeFilterName(value = " ") {
filters.someFilterName.push(value)
} Of course, I can do the following: function addValueToSomeFilterName(value = " ") {
filters.someFilterName.push(value);
filters.someFilterName = filters.someFilterName;
} But it seems strange to me, at least. What do you think about it? |
I have an idea how to handle this. Will try to do someting |
Thanks for your answer. |
No, I think I can wrap a value created in |
Maybe you can take a look at #47 |
I looked at your solution, thank you. It seems to be working. It's a little confusing me to create a watcher every time, but it's working. It seems that need to assign the result of stopping the watcher to a variable, isn't it? |
There are no result of stopping the watcher |
A little suffocating. |
I think nothing bad will happen if I call stop more then once |
You’re right. Thanks. |
Hi Kirill,
Thank's for developing for the open source.
I have a question, what to do with the array of values for the URL query param? For example -
url?query=alpha,beta,gamma
Because adding a new value to the computed variable, that is array, isn't calling the
set()
in computed.Cheers.
The text was updated successfully, but these errors were encountered: