Skip to content

onChange triggered twice on Checkboxes #36

Open
@ghost

Description

Hi,

I have a problem with the onChange event with the new decorator with checkboxes. The event is triggered twice every time the form is loaded and twice when a changed is made.

I'm using updateOn: 'blur'; and it's probably what is causing the issue. I had no such problem with the other decorator but the the model doesn't get updated if the input is removed by a condition. Now the model is updated but the "onBlur" and onChange doesn't seems to work well.

`{ "type" : "objet", "properties" : { var1: { "items" : { "enum" : [ "a", "b", "c" ], "type" : "string" }, "type" : "array", "title" : "Oui ou Non 'checkboxes'" } } } options.ngModelOptions={ updateOn: 'blur' }; options.onChange = function(modelView, newVal) { $timeout(function(){ debounceUpdate(newVal,modelView); }) }; ` 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      close