-
Notifications
You must be signed in to change notification settings - Fork 165
Vuex Store not "shared" with component SearchFilter #589
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
Comments
SearchFilter is a Vue component and is used in various places, thus the relevant state is shared through props, not through the VueX store. The components that use the SearchFilter can get the state from VueX and pass it to the SearchFilter. I can't give more details on your issue as the description is very vague and has no example attached. |
I can't reopen the issue, but these are my contribution to the discussion:
|
By the way, any component can access |
could be too early, I'll check, thx for the hint. |
no way! store is accessible but not synched with the Vuex store. @m-mohr are you able to access this.$store.getters.catalogs in Search component? |
Makes sense that it's empty. state.data is null for the search page and that's what the catalog getter depends on. state.data conatins the current STAC entity that is shown, but the search page doesn't show a specific STAC entity, thus it's null. store.catalogs is meant to be the catalogs for the current STAC entity. What could potentially help is to use getters.root and then either get cached data rom getChildren or use getters.rootLink and load the children manually. Pinia didn't exist when STAC Browser was initially implemented, but it's also not the issue here. |
lost! I tried to override reading catalogs seting up a static value (the bbox array) in the store commit from Catalog.vue (and visible at StacBrowser.vue level) but not shared at all in Search or SearchFilter. |
I'm not sure what you are trying to solve. Do you want to extract the bbox from a single collection depending on which collection is chosen in the search filter and use that as a default for the map view in the search filter? |
exactly @m-mohr! |
That sounds like a reasonsable feature request for STAC Browser, maybe write a feature request in this issue tracker for it if there's none. May take a while to implement generally though. |
I would have implemented it and prepared a PR, but was harder that expected :/ in the meantime I've already a PR #587 to have a configurable default extent to zoom in in the spatial search. |
Please open an issue regardless of whether you implement it or no so that we don't forget it. |
added the feature request: #592 |
Uh oh!
There was an error while loading. Please reload this page.
For some reason most of values in Vuex store are not shared with component SearchFilter used by router Search.
My goal is to get high level collection BBOX to show it as zoom of the spatial filter.
But "catalogs" getter return null or empty array.
Note that getter "catalogs" eturn empty array also int he upper level Search.vue
The text was updated successfully, but these errors were encountered: