Change Events and Nested Fields

Visto 176 veces
Saltar al primer mensaje no leído

F. Summers

no leída,
16 sept 2012, 18:59:3616/9/12
a backbon...@googlegroups.com
I have the following schema: 

schema: {
name: { type: "Text" },
details: { type: "List", itemType: "Object", subSchema: {
selectField: {  type: "Select", options: notificationTypes },
number: { type: "Number" },
}
}
}
}

Trying to capture the change event on "selectField" doesn't seem to work.  I've tried form.on('selectField:change', ... ) but the callback is never fired.

Thanks,
Fred

Charles Davison

no leída,
17 sept 2012, 9:06:1317/9/12
a backbon...@googlegroups.com
Have you tried form.on('details.selectField:change')?

F. Summers

no leída,
17 sept 2012, 9:27:5517/9/12
a backbon...@googlegroups.com
I have tried that without any luck.  Stepping through the backbone trigger code I noticed that the event that is triggered is "selectField:change" but there doesn't seem to be a callback associated with it.

matt tate

no leída,
3 nov 2012, 16:51:363/11/12
a backbon...@googlegroups.com
Any luck fixing this? Doesn't seem to be working for me either.

dot Config

no leída,
13 feb 2013, 13:08:0713/2/13
a backbon...@googlegroups.com
looks like this is exactly what i've hit as well...
Se ha eliminado el mensaje

Adrien Grsmto

no leída,
2 abr 2014, 7:43:282/4/14
a backbon...@googlegroups.com
You can do this like that :

this.form.fields.details.editor.on('item:open', function(listEditor, itemEditor) {
    itemEditor.modalForm.fields.selectField.editor.on('change', function(itemEditor) {
         console.log(itemEditor.getValue());
    });
});
Responder a todos
Responder al autor
Reenviar
0 mensajes nuevos