Page 1 of 1

[ANGULAR] Biding value in Event Edit

Posted: Thu May 20, 2021 1:24 pm
by SHQK

I have a custom readOnly textbox in Event Edit,
So I want every I change the value in Combobox, I want to biding the value simultaneously from this Combobox to textbox.
It near the same as two way binding in Angular.
How can I doing like that?


Re: [ANGULAR] Biding value in Event Edit

Posted: Thu May 20, 2021 2:22 pm
by alex.l

Re: [ANGULAR] Biding value in Event Edit

Posted: Fri May 21, 2021 9:20 am
by SHQK
alex.l wrote: Thu May 20, 2021 2:22 pm

To change another field value please subscribe on https://bryntum.com/docs/calendar/#Core/widget/Combo#event-change
event for your combo and do it manually.
You can add listener using field config (see https://bryntum.com/docs/calendar/#Calendar/guides/customization/eventedit.md#customizing-the-fields)
or in https://bryntum.com/docs/calendar/#Calendar/feature/EventEdit#event-beforeEventEditShow handler

Hi Alex,
I can't apply this docs, can you give me example in my case,
I have a Combobox and textbox in attachment,
So how can I biding value from Combobox to textbox everytime I change combo's value


Re: [ANGULAR] Biding value in Event Edit

Posted: Fri May 21, 2021 10:51 am
by alex.l

Try this:

eventEditService : {
    type : 'combo',
    name: 'services',
    [...]
    listeners : {
        change ({ value, source }) {
            source.parent.widgetMap.bindedEditServiceField.value = value;
        }
    }
}

All the best,
Alex


Re: [ANGULAR] Biding value in Event Edit

Posted: Fri May 21, 2021 11:35 am
by SHQK

Many many thanks Alex,
It's working