Updated css to enable non form based select options, added base work for non form select

This commit is contained in:
Martin Donnelly 2024-05-10 15:52:25 +01:00
parent fa57b2d36e
commit 6bc5ddeb1f
3 changed files with 1154 additions and 1 deletions

View File

@ -24,6 +24,16 @@
<div>selectedOption:{{selectedOption}}</div>
***
<div>
<div class="dropdown__menu -is-open">
<li *ngFor="let optionSetting of searchConfig" (click)="selectedClickHandler($event, optionSetting.mode.title)" >
<a [class.selected] = "selectedOption === optionSetting.mode.title">{{optionSetting.mode.title}}</a>
</li>
</div>
</div>
</div>
<div>
<label for="modifierSelect" >Modifier</label>
@ -33,6 +43,16 @@
</option>
</select>
<div>selectedModifier:{{selectedModifier}}</div>
***
<div>
<div class="dropdown__menu -is-open">
<li *ngFor="let modifierSetting of currentModifierList" (click)="modifiedClickHandler($event, modifierSetting.title)">
<a [class.selected] = "selectedModifier === modifierSetting.title">{{modifierSetting.title}}</a>
</li>
</div>
</div>
</div>
<div>

View File

@ -142,4 +142,25 @@ export class OmniSearchBoxComponent implements OnInit {
}
}
selectedClickHandler(ev: MouseEvent, title: string) {
ev.stopImmediatePropagation();
console.log('selectedClickHandler', title);
console.log('selectedClickHandler', ev);
this.selectedOption = title;
this.updateModeSelection();
}
modifiedClickHandler(ev: MouseEvent, title: string) {
ev.stopImmediatePropagation();
console.log('selectedClickHandler', title);
console.log('selectedClickHandler', ev);
this.selectedModifier = title;
this.updateModifierSelection();
}
}

File diff suppressed because one or more lines are too long