Our pure JavaScript Scheduler component


Post by striker »

Hello. Where can I find valid documentation for splitter?

I wanted to find doc for events I can listen:
https://www.bryntum.com/docs/scheduler-pro/api/Core/widget/Splitter

I can't find any event for stop dragging. CatchAll is returning event with type: 'end'.
Doc is outdated?


Post by alex.l »

It's not a public event, that's why it's not documented. I've opened a feature request to add these events https://github.com/bryntum/support/issues/4060 , but could you please tell us what exactly you want to achieve with that?

Be aware this event may be (and will be) renamed before become to be a public.

All the best,
Alex


Post by striker »

I want to refresh some UI component programatically after finish dragging splitter. So I need that event.
Thanks, Alex!


Post by Animal »

Is it the size change of that component which requires a refresh?

Because a size change could arise from other sources. Such as if the widget ever is configured with a flex instead of a width, and its owning element changes size. Maybe the browser window changes on a regular system, or orientation change on a mobile.

If the size is your concern, then directly listening to the resize event on the widget is the better option.

https://www.bryntum.com/docs/scheduler/api/Core/widget/Widget#event-resize


Post by striker »

This event is never called.

    this.tabs = new Widget({
      appendTo: config.schedulerNativeElementRef.nativeElement,
      html:  /// my html code
      flex: 42,
      listeners: {
        resize: () => console.log('resze')
      }
    });
    

config of splitter, which is initialized beore this widget:

  this.splitter = new Splitter({
        appendTo : config.schedulerNativeElementRef.nativeElement,
        orientation : 'horizontal',
        minHeight: 5,
        listeners: {
          end: () => this.store.dispatch(new GanttStateEvents.SplitterDraggingEnd())
        }
      });

Post by mats »

You need to set monitorResize for the event to fire:

  this.tabs = new Widget({
      appendTo: config.schedulerNativeElementRef.nativeElement,
      html:  /// my html code
      monitorResize : true,
      flex: 42,
      listeners: {
        resize: () => console.log('resze')
      }
    });

Post by striker »

I missed this in doc. Sorry. It is working rigtt now! Thanks.


Post by striker »

Can you update your documentation?
https://github.com/bryntum/support/issues/4060?


Post by mats »

Yes, sure - we had a small docs glitch which hid these events. Fixed now!


Post by striker »

Thanks, but still nothing changed in the doc. Missing drop event in Events on the bottom
https://www.bryntum.com/docs/scheduler-pro/api/Core/widget/Splitter


Post Reply