Input not closing on selection?
See original GitHub issuePlease fill below information if issuing a bug report.
Expected behaviour
When I use the typeahead or standard dropdown menu, upon selecting an option, I would expect the input to close unless multiple = true.
Actual behaviour
Upon selecting an option, the dropdown menu stays open.
More Info
ng-select version: 0.6.1
browser: chrome
reproducible in demo page: no
–
Is there anything that would cause such behavior from occurring?
<ng-select formControlName="requestor" [items]="employees" bindLabel="NTID" placeholder="Search Employees" typeToSearchText="Enter 2 characters to begin your search.."
notFoundText="No employee records found" [typeahead]="typeahead" [clearable]="false" [(ngModel)]="employeeModel">
<ng-template ng-label-tmp let-item="item">
{{ item.FirstName + ' ' + item.LastName + ' ('+item.NTID+')'}}
</ng-template>
<ng-template ng-option-tmp let-item="item">
<div class="row">
<div class="col-md-1 peopleSearchPic">
<img src="{{ PhotoURL }}{{item.QID}}.jpg" width="35px" height="45px">
</div>
<div class="col-md-11">
{{ item.FirstName + ' ' + item.LastName }}
<div class="row">
<div class="col-md-12">
<span class="smallText">NTID: {{ item.NTID }} | Location: {{ item.CenterName }}</span>
</div>
</div>
</div>
</div>
</ng-template>
</ng-select>
Issue Analytics
- State:
- Created 6 years ago
- Comments:13 (8 by maintainers)
Top Results From Across the Web
Preventing close of select input on selection in React
According to this answer, it's not really possible with a native <select> element—at least not quite like you'd expect.
Read more >Dropdown is not getting close in the Lightning Input box in LWC
Hi I have created the lightning input box which contains some value as a drop down but when i am clicking outside of...
Read more >Search Material Select closing dropdown on search input clic
Actual behavior When clicking into the input field on the searchable select box, the dropdown treats the click as if it is not...
Read more >closing input tags with /> or just >??? - Codecademy
The exercise (Getting Input Section 2 Pt 2) says they should close with a /> but each one I see closes without the...
Read more >Select - Ant Design
The height of the input field for the select defaults to 32px. ... When I click elements in dropdownRender, the select dropdown will...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
my fix, works for me:
this solution works for me