I'm currently working on a feature that involves auto-selecting provinces in Thailand. The functionality I am trying to achieve is when Province A is selected from the province dropdown, the district dropdown should automatically update to display values corresponding to Province A. Similarly, selecting Province B should reflect districts in Province B in the district dropdown, although the UI may still show districts from Province A.
Despite referring to treeselect documentation and experimenting with different approaches for several days, I have unfortunately been unable to find a solution :-(
This is how the current UI appears
<treeselect
id="province-selected"
v-model="state.provinceSelected"
:options="provinceArr"
placeholder="กรุณาเลือกจังหวัด"
noResultsText="ไม่พบข้อมูล"
data-test="province-input"
:class="{ errorselect: v$.provinceSelected.$errors.length }"
:normalizer="normalizerProvince"
@select="getDistrict"
zIndex="20000"
:clearable="false"
:allowClearingDisabled="true"
/>