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?
Asked
Active
Viewed 6,075 times
3

General Grievance
- 4,555
- 31
- 31
- 45

Jishan
- 169
- 1
- 6
- 18
-
For an example? – Hrishikesh Kale Jul 24 '18 at 11:18
-
@hrishikesh I can't upload screen shot. – Jishan Jul 24 '18 at 11:28
-
after selecting an option from the dropdown cursor inside the dropdown the blinking cursor should be after the last character of the text. but it moved to the first after selecting any option – Jishan Jul 24 '18 at 11:30
-
1I got your issue and have an answer for you hope this work for you! – Hrishikesh Kale Jul 25 '18 at 05:29
2 Answers
8
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

Hrishikesh Kale
- 6,140
- 4
- 18
- 27
-
2If this solution worked for you , you can accept this as an answer which will be easier for someone looking for similar problem – Hrishikesh Kale Jul 26 '18 at 09:32
-
2
4
Use the following code in CSS
.ng-select .ng-select-container .ng-value-container .ng-input>input {
caret-color: transparent;
}

David Buck
- 3,752
- 35
- 31
- 35

Angel Mercy
- 41
- 2
-
1Worked fine, although a selector as simple as `.ng-has-value input` was sufficient for me. – certainlyakey May 28 '21 at 11:08