mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
Filter - QueryToken - Alle ausgewählten Options übernehmen
Styling Checkbox - padding bottom auf 1 rem
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
}
|
||||
|
||||
.ui-option {
|
||||
@apply px-4 py-2 flex flex-row justify-between items-center;
|
||||
@apply px-4 pt-2 pb-4 flex flex-row justify-between items-center;
|
||||
|
||||
.btn-expand {
|
||||
@apply border-none outline-none bg-transparent text-cool-grey;
|
||||
|
||||
@@ -101,15 +101,19 @@ export class UiOption implements IUiOption {
|
||||
}
|
||||
|
||||
getSelectedOptions(): UiOption[] {
|
||||
const selected: UiOption[] = [];
|
||||
|
||||
if (this.selected) {
|
||||
// Wenn selected oder alle Child UiOptions selected gebe aktuelle instanz zurück
|
||||
return [this];
|
||||
} else if (this.hasChildren()) {
|
||||
// Finde alle UiOptions die selected sind
|
||||
return this.values.map((f) => f.getSelectedOptions()).reduce((agg, options) => [...agg, ...options], []);
|
||||
selected.push(this);
|
||||
}
|
||||
|
||||
return [];
|
||||
const selectedChildren = this.values?.map((f) => f.getSelectedOptions()).reduce((agg, options) => [...agg, ...options], []);
|
||||
|
||||
if (selectedChildren?.length) {
|
||||
selected.push(...selectedChildren);
|
||||
}
|
||||
|
||||
return selected;
|
||||
}
|
||||
|
||||
getUnselectedOptions(): UiOption[] {
|
||||
|
||||
Reference in New Issue
Block a user