Placeholder not displaying for empty string
See original GitHub issueIs your feature request related to a problem? Please describe.
When a formControl is passed into ng-select with a value of ''
, placeholder is not getting displayed.
Describe the solution you’d like
I think that placeholder should be displayed when ''
is the current value, or placeholder should be passed a function that lets the user decide when placeholder should be displayed or not.
Describe alternatives you’ve considered
Constructing a formControl with a default of null
solves this, but it would make sense for ''
to be treated the same way.
Thanks!
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
angular - Check if string is empty inside a placeholder tag?
I have this input field and it has a placeholder tag. I need to check if the variable which goes inside placeholder tag...
Read more >placeholder - CSS: Cascading Style Sheets - MDN Web Docs
The ::placeholder CSS pseudo-element represents the placeholder text in an or element.
Read more >Placeholders - The jQuery replacement for select boxes
Select2 supports displaying a placeholder value using the placeholder configuration option. The placeholder value will be displayed until a selection is made.
Read more >Experience editor does not show the empty placeholder ...
When we add any component in empty placeholder in experience editor and then remove the component, we do not see the the empty...
Read more >CSS ::placeholder and :placeholder-shown
If you wanted to add styles for empty placeholder, we can pass empty string " " as placeholder. <input type="text" placeholder=" " /> ......
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
angular = 💩
Is there any way to show placeholder, if the ngModel is an empty string (‘’) ?? Like in the previous versions…,