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

Cannot reset a reference field with select2/fngAjax #53

Closed
DerekDomino opened this issue Oct 2, 2014 · 2 comments
Closed

Cannot reset a reference field with select2/fngAjax #53

DerekDomino opened this issue Oct 2, 2014 · 2 comments

Comments

@DerekDomino
Copy link

Define in a model a reference field input with the select2/fngAjax display options

component: {
        type: Schema.Types.ObjectId,
        ref: 'Component',
        form: {
            select2: {
                fngAjax: true
            },
        }

At the front-end level, create a new document related to this model. Select a value for the reference field. Save. Reload the document.

Then, try to reset/empty the field: impossible. Once this field is set to a value, it is not possible to reset it.

@mchapman
Copy link
Member

mchapman commented Oct 6, 2014

After quite a lot of digging I have discovered that

component: {
        type: Schema.Types.ObjectId,
        ref: 'Component',
        form: {
            placeHolder: 'Select component',
            select2: {
                fngAjax: true
            },
        }

works. I will make it happen automatically.

@DerekDomino
Copy link
Author

Excellent idea!

Le lundi 6 octobre 2014, Mark Chapman notifications@github.com a écrit :

After quite a lot of digging I have discovered that

component: {
type: Schema.Types.ObjectId,
ref: 'Component',
form: {
placeHolder: 'Select component',
select2: {
fngAjax: true
},
}

works. I will make it happen automatically.


Reply to this email directly or view it on GitHub
#53 (comment)
.

mchapman added a commit to forms-angular/website that referenced this issue Oct 6, 2014
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

No branches or pull requests

2 participants