I have a question about how you approach solving such composite filters for searching products from API.
For example:
-
filters are composed of different elements in different variations (input, select, etc..)
-
elements:
— have an initial state received from the server
— have some kind of transformation during change/sending
— have the ability to reset to the initial state
I think there should be a composable/store for each element in order to have some kind of logic inside In the element.
In the element component, import v-model from composable
In the filter component, we import the dat prepared the request, and element component.
in the third component import reset function
Given this solution, where is the best place to get the initial data for the elements? (filter component, init function inside composable or etc)
How to correctly implement such composable/store and use them in a filter component?
Or if you have alternative solutions it would be interesting to listen or look at the code
speculant is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.