consider the following: We have a map with different geographic entities (e.g. region, district, chiefdom) and one Select per such entity (e.g. on Select to select region of a country, next to select district, etc.). With this one can navigate a country’s structure from national to local level.
We now added a ‘free text’ search field using AutoCompleteInput with which you can search these entities on any level, e.g. you could select an auto complete entry that is a region and thus only sets the first select or a chiefdom which would set all 3 selects (region, district, chiefdom).
Any choice from AutoCompleteInput should be reflected in the selects as well which means that we set update the value of several selects after another which means the map (and additional dependent data displays) updates in several steps. This we don’t want.
What can we do to avoid this behavior?
- use ‘remove_on_change’ to temporarily remove the callbacks to prevent them from being called and only trigger the ‘last’ on_change. This should work but seems quite messy.
- maybe have a separate data structure that encodes the current ‘zoom-level’ and ‘location’? Currently this is encoded in the different selects. This object could ensure that all dependent displays are update correctly without the additional steps
Is there an idiomatic way to achieve this?
EDIT: I think using ColumnDataSource might be good candidate to store the state of the dashboard.