Unplanned
Last Updated: 26 Apr 2024 09:55 by ADMIN
José Fº
Created on: 21 Sep 2021 11:54
Category: KendoReact
Type: Feature Request
5
Scheduler Event Selection - Get selected events list and detect changes
We have implemented an editable Scheduler, and we need to make a development related to the selection of events within the calendar. We need support to know how to consult the events that are selected, and how to detect selection changes in these, in order to mantain a list of "active selections".

We are not able to find where is stored the information about which events are selected. We have found information about overloading the Scheduler prop editItem with a CustomEditItem and overriding this event to detect when a task is selected.

  const handleClickAction = (event) => [
    {
      type: event.syntheticEvent.shiftKey
        ? ITEMS_SELECT_ACTION.add
        : ITEMS_SELECT_ACTION.select,
    },
  ];

With this we could detect when a certain event is selected. But we are still missing the part about when they are unselected. If we click outside the events, we get the selection removed, but we have no way to detect the event of this, and therefore we can't update our list of selections.

Can you give us support on how we can get the information about the selections, and keep it updated at all times? Thank you,

7 comments
ADMIN
Vessy
Posted on: 26 Apr 2024 09:55

Hi, Stoyan,

Thanks a lot for your feedback. I have already forwarded this request to the Kendo React Product manager and they will review your suggestion and decide how to proceed. Any update of the status of the request will be applied to this item immediately.

Kind regards,


Vessy
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources!

Stoyan
Posted on: 23 Apr 2024 13:28

Thanks for the answer, Vessy,

At the very minimum if SchedulerViewSelectedItemsContext or/and useSchedulerViewSelectedItemsContext could simply be exported from the package that would be enough - the effort for that should be extremely minimal from the dev side as the implementation is there and used internally, they are just not made public.

ADMIN
Vessy
Posted on: 23 Apr 2024 10:21

Hеllo, Stoyan,

I cannot help but agree with you that this feature will be very useful, but it is still not among the planned ones due to the low demand for it from the other users through the years (it used to have only one vote before your post). Still, I will pass it to our PMs for a further consideration and they will decide on how to proceed with this request accordingly.

Kind regards,
Vessy
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources!

Stoyan
Posted on: 16 Apr 2024 12:31

I cannot imagine this has not been implemented yet, as having control over the event selection is critical to any reasonably complex usage of the Scheduler component. Internally Kendo has access to this information through SchedulerViewSelectedItemsContext (useSchedulerViewSelectedItemsContext), but this context is not exported from the package and there is no way for us to use it.

And since selection is altered through a variety of actions (pressing Esc, Tab, clicking on events, Ctrl clicking for multiselect, clicking outside of event, etc...) it is practically impossible to override all these actions just to track the selection. If we miss even one such case, our tracking will be out of sync with the actual selection.

For now, the best approach for tracking the selection is to check SchedulerItemProps::selected inside of every scheduler event item and report it through some context to the parent. On the other hand, controlled changing of the selection would be nearly impossible without access to SchedulerViewSelectedItemsContext::dispatchItemSelection().

ADMIN
Stefan
Posted on: 27 Sep 2021 10:42

Hello, José,

Thank you for the confirmation.

I have directly converted this ticket to an official public feature request and we will monitor its popularity.

Then based on the popularity we will plan it accordingly and update its status.

This is the public link, if you need to share it with the team:

https://feedback.telerik.com/kendo-react-ui/1536250-scheduler-event-selection-get-selected-events-list-and-detect-changes

I have also already added your vote for convenience.

Regards,
Stefan
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

José Fº
Posted on: 27 Sep 2021 10:17
Hello Stefan,

Yes please, I would appreciate being able to request the creation of this functionality.

I have tried to do it from the link you send me, but it redirects me to create a ticket, do I have to do something or can you create it? There is no problem using the original ticket, there is no confidential information.

Thank you,

Regards,
ADMIN
Stefan
Posted on: 23 Sep 2021 12:22

Hello, José,

After discussing this we the team we agree that this will require introducing a new onSelectionChange event that will be fired when the Scheduler selection is changed.

I can suggest logging an official feature request for it as this is how we prioritize the tasks based on the community interest:

https://feedback.telerik.com/kendo-react-ui

I can also directly transfer this ticket if there is no private information shown in it.

Regards,
Stefan
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.