Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Display issue with selectize theme + multiple + required #1889

Open
SaintFlipper opened this issue Jan 17, 2017 · 3 comments
Open

Display issue with selectize theme + multiple + required #1889

SaintFlipper opened this issue Jan 17, 2017 · 3 comments

Comments

@SaintFlipper
Copy link

Not sure that this is the same as previous issues with ui-select + multiple + required (eg. #258).
Issue is that with <ui-select theme="selectize" multiple ng-required="true" ...> the control doesn't display the expected red 'invalid' border initially. Adding an item then removing it again then shows the red border.
It looks like it's related to the ng-dirty style against the created parent ui-select-container DIV. If you manually add that style in FF/Chrome devtools then the red border shows up.

See: http://plnkr.co/edit/Iqb6fx0LUqupBUIS3xIL?p=preview

Other similar issues such as #258 seem to relate to ng-empty or ng-invalid not being set, but devtools shows that these are correctly set here. This seems to be a styling thing.

Note also that with theme="bootstrap" even adding then removing items doesn't highlight the empty field. Maybe that's a different issue, but seems likely to be closely related.

@Jefiozie
Copy link
Contributor

Jefiozie commented Mar 7, 2017

hi @SaintFlipper , why should do border be there initially? Can you explain this then I have a better understanding of what you mean.

Thanks.

@SaintFlipper
Copy link
Author

Hi @Jefiozie,
I just mean the red border associated with the ng-invalid style, and which would be displayed for an Angular control which has ng-required="true" but is blank/empty. I've updated the plunker at:
http://plnkr.co/edit/gPpMBftou8FlxSLIcmo2?p=preview
to clarify this with a thicker border. The second input is a simple text field with ng-required="true", and it shows the thick red border until some text is entered, at which point the border changes to green (the ng-valid style).
However the ui-select+selectize input field at the top is also blank, but doesn't show the red border until something is added then removed again (even then it doesn't seem to use the defined ng-invalid style as the red border looks like it's only 1 pixel thick).
Thanks.

@Jefiozie
Copy link
Contributor

Jefiozie commented Mar 7, 2017

It looks like it has something to do with the selectize-input css class. Could you investigate it a little bit further?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants