Answer the question
In order to leave comments, you need to log in
Where to store search settings?
The method requests data from the server, the server returns a JSON object with data on the previously performed search, search parameters.
There can be multiple lookups in a project, in different sections, so the JSON is:
l
et res = {"search1": {...parameters}, "search2": {...parameters}}
class Search {}, class Search1 extends Search {}
where to store the data? Suppose so, then where to store the Search objects? To make it easy to work with them, wrap them in a facade?
Answer the question
In order to leave comments, you need to log in
It's easier - put it in data-src in the search field.
searchField.setAttribute('data-src', res);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question