Premium support for our pure JavaScript UI components


Post by liuyan@honeycombtech »

https://bryntum.com/examples/scheduler/filtering/

scheduleMenu:{
      items:{
      addEvent:false,
      clearLightHigh:{
        text:'test'
      } 
     } 
    },
2022-05-05 14.13.23.gif
2022-05-05 14.13.23.gif (5.28 MiB) Viewed 800 times
rightclick-error.jpg
rightclick-error.jpg (174.61 KiB) Viewed 800 times

Post by alex.l »

In case a row was already focused ( you clicked in it before), event won't be highlighted. Otherwise it will be.

All the best,
Alex


Post by alex.l »

What's the problem are you experienced because of that? Could you please clarify it.

All the best,
Alex


Post by liuyan@honeycombtech »

Hi,
We have a request to quick selected all events of order when right-click on one event. So we have a scheduler-menu button for clear all selected events or clear filtered events.

Is there any way to cancel this default behavior?
We expect right-click events and selected events should be irrelevant.


Post by tasnim »

To achieve this you have to listen to an event scheduleMenuItem and you have to get the eventElement using getEelementFromEventRecord.
Please check these :
https://bryntum.com/docs/scheduler/api/Scheduler/feature/ScheduleMenu#event-scheduleMenuItem
https://bryntum.com/docs/scheduler/api/Scheduler/view/mixin/SchedulerDom#function-getElementFromEventRecord

Here is how you can achieve it:

    listeners: {
        scheduleMenuItem({ resourceRecord }) {
            const el = scheduler.getElementFromEventRecord(resourceRecord.events[0], resourceRecord);
            setTimeout(() => {
                el.classList.remove('b-sch-event-selected');
            })
        }
    },

Best regards,
Tasnim


Post by liuyan@honeycombtech »

Hi,

We tried what you say, but it doesn't work very well. Maybe it needs to foreach ?
Our project has a lot of events, is there a better way to resolve this issue?

2022-05-06 15.37.56.gif
2022-05-06 15.37.56.gif (5.67 MiB) Viewed 721 times

Post by liuyan@honeycombtech »

Hi,
And it will affect the scroll bar.

2022-05-06 16.03.25.gif
2022-05-06 16.03.25.gif (3.53 MiB) Viewed 720 times

Post by Animal »

Please can you post a description of exactly the behaviour you wish to implement?

I have understood nothing in this thread.

The videos do not help because I don't understand what they are doing.

What is needed is an exact description of requirements.


Post by liuyan@honeycombtech »

Sorry, my English is bad.

There is a schedule menu 'test'. When I click this button, there is a default behavior about selecting an event in the current row.

I think this behavior is wrong. Because

We have a request to quickly selected all events of order when right-click on one event. So we have a scheduler-menu button for clearing all selected events or clear filtered events.


Post by Animal »

When you right click, the Menu is focused. No event selection takes place.

When the menu hides, the grid cell is focused.

By default, focusing a grid cell will drop down into the grid cell and focus the first event it finds in there.

What application processing is this preventing you from implementing?


Post Reply