Skip to content

Using with ui-validate causes chosen to break when value is invalid #35

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
adrianboimvaser opened this issue Feb 6, 2014 · 7 comments
Closed
Assignees
Labels

Comments

@adrianboimvaser
Copy link
Contributor

I will provide more details and a JSFidde later.

@chexxor
Copy link

chexxor commented May 5, 2014

I'm also seeing an issue when using ui-validate with chosen.

Here's a Plnkr which demos the issue: http://plnkr.co/edit/onc2Ol

Select one market, no problem. Select two markets, a validation rule rule fails. When the validation rule fails, the previous value in the input box is removed - there's the error.

Any ideas?

@leocaseiro leocaseiro added the bug label Mar 1, 2016
@leocaseiro
Copy link
Owner

Sorry the delay, I've just took this project that was abandoned (read #162).

The issue with ui-validate is not only with angular-chosen, but also with any multiple select.

If you remove the chosen directive from your select, it's still having an error:
"Advanced Criteria Required when Multiple Markets"

I found a solution that might be a fix for you angular-ui/ui-select#914

@leocaseiro leocaseiro added invalid and removed bug labels Mar 1, 2016
@chexxor
Copy link

chexxor commented Mar 1, 2016

I haven't used this in awhile, so I've no stake in this bug anymore. Feel free to close if the issue creator doesn't mind.
I appreciate your stepping up as a new maintainer, though! Good luck and have fun!

@leocaseiro leocaseiro self-assigned this Mar 1, 2016
@leocaseiro
Copy link
Owner

Thanks for your feedback @chexxor it's a shame that almost 2 years this still an issue. I'll have a deep look into ui-validate and fix this in your plunkr before close the issue.

@leocaseiro leocaseiro added bug and removed invalid labels Mar 10, 2016
@leocaseiro
Copy link
Owner

I've fixed the same way I'd fix with ng-required #87 or required #169 only with CSS.

.localytics-chosen {
  display: block !important;
  position:absolute;
  clip:rect(0,0,0,0);
  height: 29px;
}

Your plunkr up to date with ui-validate working
http://plnkr.co/edit/QMEeIb?p=preview

@chexxor
Copy link

chexxor commented Mar 10, 2016

Impressive! Nice work! 👍

@leocaseiro
Copy link
Owner

🍻 Thanks!

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

No branches or pull requests

3 participants