How can i change the background color of the previously Selected Item
New DiscussionI am wondering how i can overwrite the color that Igx-drop-down uses to show the previous selection. In my use case i want the user not to see the previous selection. The code that i am using is like this which i uses as a reusable component
<button [igxToggleAction]="quickActionsDropdown"
type="button"
[igxToggleOutlet]="outletQuickActionsDropdown"
[igxDropDownItemNavigation]="quickActionsDropdown"
igxButton="icon" [overlaySettings]="overlaySettings"
igxRipple>
<igx-icon [style.color]="'white'">add</igx-icon>
</button>
<igx-drop-down #quickActionsDropdown (selectionChanging)="onSelection($event)" #toggleDirective>
<igx-drop-down-item *ngFor="let item of items" [value]="item" class="small-menu-item">
<igx-icon>{{item.icon}}</igx-icon>
<span>{{ item.text }}</span>
</igx-drop-down-item>
</igx-drop-down>
<div class="overlayOutlet" igxOverlayOutlet #outletQuickActionsDropdown="overlay-outlet"></div>
FYI when i try the menu solution with
public onSelection(eventArgs: ISelectionEventArgs) {
this.text = eventArgs.newSelection.value;
eventArgs.cancel = true;
}
It does not work as even so the item is no longer highlighted but after clicking the drop down no longer closes
StackBlitz Sample
Sign In
to post a reply
Replies
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
Favorites
0 Replies
5 Created On
Aug 11, 2022 Last Post
3 years, 7 months ago