mirror of
https://github.com/immich-app/immich.git
synced 2024-12-29 15:11:58 +00:00
fix(mobile): Reset dropdown values in search by location on mobile (#9261)
* set derived inputs as null if source input changes * format --------- Co-authored-by: Tushar Harsora <tushar.harsora.harsora@oracle.com> Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
parent
dc4f7bef69
commit
c18beddef8
1 changed files with 12 additions and 3 deletions
|
@ -87,11 +87,16 @@ class LocationPicker extends HookConsumerWidget {
|
|||
trailingIcon: const Icon(Icons.arrow_drop_down_rounded),
|
||||
selectedTrailingIcon: const Icon(Icons.arrow_drop_up_rounded),
|
||||
onSelected: (value) {
|
||||
if (value.toString() == selectedCountry.value) {
|
||||
return;
|
||||
}
|
||||
selectedCountry.value = value.toString();
|
||||
stateTextController.value = TextEditingValue.empty;
|
||||
cityTextController.value = TextEditingValue.empty;
|
||||
onSelected({
|
||||
'country': selectedCountry.value,
|
||||
'state': selectedState.value,
|
||||
'city': selectedCity.value,
|
||||
'state': null,
|
||||
'city': null,
|
||||
});
|
||||
},
|
||||
),
|
||||
|
@ -120,11 +125,15 @@ class LocationPicker extends HookConsumerWidget {
|
|||
trailingIcon: const Icon(Icons.arrow_drop_down_rounded),
|
||||
selectedTrailingIcon: const Icon(Icons.arrow_drop_up_rounded),
|
||||
onSelected: (value) {
|
||||
if (value.toString() == selectedState.value) {
|
||||
return;
|
||||
}
|
||||
selectedState.value = value.toString();
|
||||
cityTextController.value = TextEditingValue.empty;
|
||||
onSelected({
|
||||
'country': selectedCountry.value,
|
||||
'state': selectedState.value,
|
||||
'city': selectedCity.value,
|
||||
'city': null,
|
||||
});
|
||||
},
|
||||
),
|
||||
|
|
Loading…
Reference in a new issue