Our pure JavaScript Scheduler component


Post by tagnm »

Here is a screenshot from the demo I provided, showing the bug visually. Multiple events were clicked at different times. All ok.

Then it did not select the corresponding event on the partner timeline. Seems to happen more during a "update" action.

Attachments
chrome_ljsUV4VnO3.png
chrome_ljsUV4VnO3.png (159.6 KiB) Viewed 197 times

Post by tasnim »

Hi,

I cannot reproduce it. I tried selecting multiple events multiple times but was not able to reproduce that.
Can you please provide a video on how to reproduce it?


Post by tagnm »

Thank you for checking. I have been able to reproduce the issue, and have attached a video.

This is recorded on a PC, using Chrome (up to date).

I could trigger it within about 4 clicks. I just double checked the video and it actually happens twice!

On ID #48 and then on #46. You can see the early exit in the console because the code never reaches the line "🛑 END of customEventSelection 🛑".

Thanks,
NM

Attachments
chrome_CjoIuq6NWi.mp4
(780.11 KiB) Downloaded 19 times

Post by tasnim »

Hi,

Thanks for the video and the test case. I've reproduced it. We'll investigate it. Here is the ticket to track progress https://github.com/bryntum/support/issues/7000

Good Luck :),
Tasnim


Post by tagnm »

Thank you Tasnim. I am interested to see what the outcome is.


Post by tagnm »

Hi,

I checked the Github issue and I can see it is still open. Is there any estimation on when the issue is going to be further investigated?

There is quite an important feature we need to implement which requires the event selection/deselection functionality. We are building up from the single selection of events to eventually enable multi-select of events. I have got a multi-select "demo" that I built upon the code I provided on this forum post. But it obviously has the issue I have raised and is preventing further development.

Any information is appreciated.

Thanks,
NM


Post by alex.l »

Hi NM,

Thank you for your patience! We understand how important to you to have it fixed.
We just started work on this issue and will try our best to fix it in next days.

All the best,
Alex


Post by alex.l »

Hi NM,

While we are checking the root cause of this behaviour, you might use a workaround: first scroll the event into a view and select it afterwards. I tested it and it looks stable.

if (!otherSource.isEventSelected(pairedEvent)) {
            // first scroll into view
            firstSource.scrollEventIntoView(selectedEvent, scrollOptions);
            await otherSource.scrollEventIntoView(pairedEvent, scrollOptions);

        otherSource.suspendEvents();
        // select when the event is visible in the viewport
        otherSource.select(pairedEvent);
        firstSource.highlightTimeSpan([
            {
                startDate: selectedEvent.startDate,
                endDate: selectedEvent.endDate,
            },
        ]);
        otherSource.highlightTimeSpan([
            {
                startDate: selectedEvent.startDate,
                endDate: selectedEvent.endDate,
            },
        ]);
        otherSource.resumeEvents();
    

All the best,
Alex


Post by tagnm »

Thank you Alex, I will give your response a go and see how that works.

I have a general question. Is using eventSelectionChange the correct choice for what we are trying to do?

(Basically for things to happen when Events are selected/deselected). We are building up to implement multi-select support, which for us means Events can be selected with a mouse click, and then additional Events can be CTRL-clicked.

Thanks,
NM


Post by alex.l »

Hi,

Yes, it sounds like a good choice, there are shouldn't be any problems with multi-select, as far as I see now.

All the best,
Alex


Post Reply