Jishan
Jishan

Reputation: 199

How to remove the blinking cursor after selecting an option from dropdown in by ng-select in Angular?

i am using ng-select in Angular 5 for dropdown. After selecting an option the blinking cursor should be vanished or it's position should be at the end of the text. But after selecting any option from dropdown the blinking cursor goes at the start position of the text. How can i resolve this issue?

Upvotes: 5

Views: 7328

Answers (2)

Angel Mercy
Angel Mercy

Reputation: 41

Use the following code in CSS

    .ng-select .ng-select-container .ng-value-container .ng-input>input {
caret-color: transparent;
}
    

Upvotes: 4

Hrishikesh Kale
Hrishikesh Kale

Reputation: 6548

I mean it's not an issue but it's a feature of ng-select,

as it by default lets you to search or enables you the autocomplete functionality,

to stop this or to hide the autocomplete functionality you need to pass one extra attribute called

[searchable]="false"

this will disable the cursor and autocomplete functionality will also not work hope this helps you

here is the plunkr also here is the full documentation for the same

Upvotes: 10

Related Questions