Page 1 of 1

[VUE] Calendar fields based on eventType with eventType selector

Posted: Tue Jul 28, 2020 6:02 pm
by j.hemelaers

Hi,

Is it planned in the future that when you use the eventType fields, that on create of an event the fields will directly dynamicaly displayed based on the eventType that you select?
As for now whem i use 2 type of eventTypes and for each eventType i configure different fields. Then on create of an event just the default form is displayed. So first i need to save the event with a selected eventType, and then i have to open the event again for a second time to see the custom fields for that event.


Re: [VUE] Calendar fields based on eventType with eventType selector

Posted: Tue Jul 28, 2020 6:16 pm
by Animal

Yes, this will be fixed in the next release: https://github.com/bryntum/support/issues/1228


Re: [VUE] Calendar fields based on eventType with eventType selector

Posted: Tue Jul 28, 2020 6:25 pm
by j.hemelaers

I believe that the issue is allready fixed what is discribed there.
It was version 1.0.1. I downloaded this version and tested what was discribed in the ticket. And now that works.
This is an other issue. It's not about dissapearing fields when you switch clicking existing events.
They just are not showing on creation.


Re: [VUE] Calendar fields based on eventType with eventType selector

Posted: Wed Jul 29, 2020 9:33 am
by Maxim Gorkovsky

Hello.
Is your complaint about editor fields not being hidden/shown when event type is changed in the editor? Like in this scheduler demo? https://bryntum.com/examples/scheduler/eventeditor/
I opened ticket to improve this behavior: https://github.com/bryntum/support/issues/1257


Re: [VUE] Calendar fields based on eventType with eventType selector

Posted: Wed Jul 29, 2020 9:36 am
by j.hemelaers

Hi,

Yes indeed. In the demo you mentioned you can see the custom fields toggling when changing the eventType :)


Re: [VUE] Calendar fields based on eventType with eventType selector

Posted: Fri Jul 31, 2020 3:17 pm
by dongryphon

Looks like the docs needed adjusting. Try this when you get a chance?

   items: {
       eventTypeField : {   // this must be "eventTypeField" not "eventType"
           name : 'eventType',   // this must match the field name that holds the event type
           // ... 
       }
   }

Also, the eventType field must be declared on your model class since it is not a standard field:

    class MyEvent extends EventModel {
        static get fields() {
            return [
                { name : 'eventType' }
            ];
        }
    }

Re: [VUE] Calendar fields based on eventType with eventType selector

Posted: Sat Aug 01, 2020 10:35 am
by j.hemelaers

Hi,

Thanks for the answer. This way of using works like i wanted!

Thank you!