How to gracefully obtain responsive data, dependent data.

I don"t know if the statement of responsive data is correct, let"s look at the example.
clipboard.png

as shown above
first get the region, then get the first as a parameter, then get the type, and then get the first type as a parameter to get the status

when the region changes, get the type, get the first type as a parameter to get the status.

is there any elegant way to write it that feels very redundant?

Oct.07,2021

multilevel linkage . Generally speaking, for the sake of user experience, we will choose to load the data first. Otherwise, every HTTP request is unpredictable.


there are many similar ones, such as the three-stage linkage of picker, selected by provinces, cities and autonomous regions. This group of two ideas,
1, if the data is stable and the total amount of data is small, cache all data directly
2. If the data changes frequently or the total amount is large, it is recommended to cache only first-level data, such as your region, and then each time you select a level, re-send a request to obtain the data.

at the same time, doing a good job of data coding will also make it convenient for you to check the relevant and linked data

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bf31b1-31e56.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bf31b1-31e56.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?