Skip to content

Disabled not working #122

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
asgeir-s opened this issue Aug 25, 2017 · 3 comments · Fixed by #123
Closed

Disabled not working #122

asgeir-s opened this issue Aug 25, 2017 · 3 comments · Fixed by #123

Comments

@asgeir-s
Copy link

asgeir-s commented Aug 25, 2017

I can't get disable/readonly to work on strapselect.

I set the form option like this:

           formOptions: {
                formDefaults: {
                    ngModelOptions: { updateOn: 'blur' },
                    readonly: true
                }
            }

When doing this all other fields on the form get disabled. But the stapselect (button tag) does not get any disable or ng-disable attributes.

Although, I saw that this should have already been resolved by #109.

Example of schema I use:

        maritalStatus: {
            "type": "string",
            "x-schema-form": {
                title: "Sevilstand:",
                htmlClass: "col-sm-6 select",
                placeholder: "property.select.placeholder",
                "type": "strapselect",
                readonly: true,
                titleMap: [
                    { value: "giftpartner", name: "Gift / Partner" },
                    { value: "samboer", name: "Samboer" }
                ]
            }
        }

Am I doing something wrong or is it a bug?

@nicklasb
Copy link
Member

nicklasb commented Aug 25, 2017

Hi, I am not sure, I have not experienced that, could your please make plunkr example?

@asgeir-s asgeir-s changed the title Readonly not working Disabled not working Aug 28, 2017
@asgeir-s
Copy link
Author

asgeir-s commented Aug 28, 2017

Thank you for the fast response :)

While beginning to create the plunker, I found the problem so I submitted pull request #123 .

nicklasb added a commit that referenced this issue Aug 28, 2017
Rebuild distribution files with last changes from 'src'; Fixes #122
@nicklasb
Copy link
Member

Good stuff, thanks!

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