Skip to content
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

Field Choices - give extra blank option added using ng-repeat in select tag #382

Closed
thachp opened this issue Apr 3, 2015 · 0 comments · Fixed by #416
Closed

Field Choices - give extra blank option added using ng-repeat in select tag #382

thachp opened this issue Apr 3, 2015 · 0 comments · Fixed by #416
Assignees

Comments

@thachp
Copy link

thachp commented Apr 3, 2015

The following filter codes would generate extra blank option in the dropdown field.
It is a common problem with angular and the option tag.

See:
http://stackoverflow.com/questions/15488181/angularjs-extra-blank-option-added-using-ng-repeat-in-select-tag?lq=1

.filters([
    nga.field('success_status_search', 'choice').label('Status')
        .choices([{value:'1', label:'Sent'}, {value:'0', label:'Failed'}])
    ])

The temporarily solution is to use CSS to hide the empty field.

select option:empty { display:none }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants