I'm using a TextField and other fields in a form I'm developing, but I wonder if I can bind these fields with a store, so I don't have to keep assigning field by field to the store.
Support Forum
There's a (private) flag available on Container called autoUpdateRecord
which will write changes to the https://bryntum.com/docs/scheduler/#Core/widget/Container#property-record loaded into your form.
Is that what you're looking for? We'll then discuss if to make this flag public.
Hi henrique,
It's not clear if all works good now or not. Do you have all required information now?
Btw, to have auto record update working well, you should extend your model to have all fields declared.
May be done with store:
const carModels = new AjaxStore({
fields : ['id', 'text', 'brandId'],
readUrl : 'data/car_models.json',
autoLoad : true
});
or by extending Model class:
class Person extends Model {
static get fields() {
return [
'name',
{ name : 'birthday', type : 'date', format : 'YYYY-MM-DD' },
{ name : 'shoeSize', type : 'number', defaultValue : 11 },
{ name : 'age', readOnly : true }
];
}
}
new AjaxStore({
modelClass: Person,
readUrl : 'data/persons.json',
autoLoad : true
});
All the best,
Alex