0

I am using Angular 7 and have an ngx-select dropdown where the options are retrieved from a database. The code is as follows:

<div class="col-lg-6">
  <ngx-select class="form-control-file" noResultsFound="noResultsFound"
    placeholder="Choose" [items]="firstList" optionValueField="id"
    optionTextField="name" formControlName="firstList" [searchCallback]="localeSearch">
  </ngx-select>
</div>

The problem is that some of the option texts are too long to be fully displayed within the dropdown. I would like the full text to be shown when the user hovers over an option with the mouse.

How can I achieve this in ngx-select?

I prefer not to use Angular Material. Is there a way to achieve this in ngx-select?

2
  • May I know what version of ngx-select you had used with ? Commented Aug 28, 2024 at 0:25
  • "ngx-select-ex": "^3.6.10", Commented Aug 29, 2024 at 14:29

1 Answer 1

0

To solve this problem you can use ngbPopover, you can get more details from this link : ngbPopover

usage:

suppose you have a span element :

<span ngbPopover="item.title" triggers="mouseenter:mouseleave" placement="bottom">Test</span>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.