Is it possible to make dependent fields only trigger on user actions, and not on dialog toggle?
Is it possible to make dependent fields only trigger on user actions, and not on dialog toggle?

I'm using dependent
to bind a couple of fields. dependent
fields seem to be implicitly triggered when the new/edit dialog is shown, but I want the values to be overridden only if the user actually changes the field.
// Only trigger when the user makes a new selection
editor.dependent('selectbox', (val, data, callback) => {
const selection = dict[val];
return {
values: {
'inputfield': selection
},
};
}, { event: 'change' });
Thank you
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Hi,
It has to be triggered when create and edit are started since they can set values (default or existing value) and the rest of the form should reflect those values.
Which field - the
selectbox
orinputfield
?You can listen for the
change
event from the input field and if there is a second parameter then Editor set the value - e.g.:Allan
Perfect. Thanks!