How to set children dropdown empty values if parent dropdown not selected

Hi, I am working on this requirement, from with 3 dropdowns:
Country > Province > District

If select Country > load Province belongs to the country
If select Province > load Districts belongs to the province.
This is solved by script. child dropdown has the filter = parent value.

However,
If I clear Country > the Province dropdown load all values without any filter.
=> expect to load empty list since there is no parent selected.

If I clear value for Province, the District dropdown load all values without any filter
=> expect to load empty list since there is no parent selected.

Please help with this.

(I am working around by set dummy filter values for child dropdown ex: filter = "noparentvalue’ if parent not selected, but this look not good)