I am wondering what controls the highlighted item after user selects an item in virtual drop down.I want to be able to not show what was previously selected. How can i do that ?
Can you please advise based on this sample you provide
https://ko.infragistics.com/products/ignite-ui-angular/angular/components/drop-down-virtual
Also how can i remove the scrolling if the items fit into the max size of the dropdown. So what i am looking for is to \dynamically show the dropdown with the size required and if it is above the max size specified i want to scroll
Hello Alex,
Thank you for providing more details regarding your use case. Now that you mention that the IgxDropDown is to be used as a menu, I believe you will find this section of our documentation very helpful.
The drop-down can easily be configured to behave as a menu by setting the selectionChanging event’s arguments cancel member to true. In this way, the selected item is not preserved when opening the menu and previous selections get invalidated. Nevertheless the selected item can be accessed via the newSelection member of the event args. Also, there is no need to modify any styles.
In the referenced topic you will also find a sample demonstrating this scenario. Additionally, as it has been a while since this thread was posted, the previously referenced onSelection event of the IgxDropDown has been renamed to selectionChanging since version 12.1.0. You can find a complete list of the introduced changes in our Changelog in GitHub here.
Sincerely,Bozhidara PachilovaAssociate Software Developer
Looking at the provided Sample it still shows the previously selected one.
Yes your code fixed the focus one but it still shows what was previously selected which is ok if you use the control to set value but if you use it as a pop up menu it is not desired. So what style do i have to modify to get rif of the background color ?
Maybe my question was not clear so i apologize. I was not referring on how to remove the actual previously selected item in the dropdown. What i want is to change the current behavior and not highlight the previously selected Item if the user calls drop down after making a previous selection. Currently its this light red bar which highlights what was selected before, that's what i want to be able to remove / not show