mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-04-17 08:00:34 +00:00
Fix bool fields (#778)
* Improved UX for boolean fields - Use segmented button - Allow tristate - Improved filtering options * Bug fix for null filter values * Prevent null filters from being sent to the server * Update release notes
This commit is contained in:
parent
286daf2567
commit
04f98559fc
4 changed files with 97 additions and 19 deletions
|
|
@ -92,9 +92,10 @@ abstract class PaginatedSearchState<T extends PaginatedSearchWidget>
|
|||
|
||||
// Skip null values
|
||||
if (value == null) {
|
||||
continue;
|
||||
f[k] = "null";
|
||||
} else {
|
||||
f[k] = value.toString();
|
||||
}
|
||||
f[k] = value.toString();
|
||||
}
|
||||
|
||||
return f;
|
||||
|
|
@ -341,7 +342,16 @@ abstract class PaginatedSearchState<T extends PaginatedSearchWidget>
|
|||
Map<String, String> f = await constructFilters();
|
||||
|
||||
if (f.isNotEmpty) {
|
||||
params.addAll(f);
|
||||
for (String k in f.keys) {
|
||||
// Remove any existing filter keys
|
||||
dynamic value = f[k];
|
||||
|
||||
if (value == null || value == "null") {
|
||||
params.remove(k);
|
||||
} else {
|
||||
params[k] = value.toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
final page = await requestPage(_pageSize, pageKey, params);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue