Page 1 of 2

[REACT] timeSpanHighlight not showing after render of page

Posted: Wed Mar 01, 2023 12:25 pm
by gorakh.nath

Hi team,
When using the timespanHighlight feature, it highlights the timespan correctly. However, after rendering the page, the highlight appears on alternate times instead of on drag and drop.
To reproduce the issue , re-render the page by adding :-

   eventDragReset(source) {
                            unHighlighTimeSpan();
                            setRefreshPage(!refreshPage);
                        }

I have attached a screenshot, video, and sample app for your reference. Could you please suggest a solution to fix the issue where the highlight appears on alternate times instead of every drag and drop?


Re: [REACT] timeSpanHighlight not showing after render of page

Posted: Wed Mar 01, 2023 12:29 pm
by mats

What does setRefreshPage(!refreshPage); do?


Re: [REACT] timeSpanHighlight not showing after render of page

Posted: Wed Mar 01, 2023 12:45 pm
by gorakh.nath

I added setRefreshPage to update the state and trigger a rerender of the page in order to reproduce the issue.


Re: [REACT] timeSpanHighlight not showing after render of page

Posted: Wed Mar 01, 2023 3:08 pm
by mats

Can you please post the code for that method here?


Re: [REACT] timeSpanHighlight not showing after render of page

Posted: Wed Mar 01, 2023 3:31 pm
by gorakh.nath

I already attached the sample application.


Re: [REACT] timeSpanHighlight not showing after render of page

Posted: Wed Mar 01, 2023 5:26 pm
by mats

Yes, but please attach the relevant code of the setRefreshPage here.


Re: [REACT] timeSpanHighlight not showing after render of page

Posted: Wed Mar 01, 2023 6:28 pm
by marcio

Hey gorakh.nath,

After a quick overview, that looks like some issue that needs a deeper investigation and could be a bug. I created a ticket for our team to check that and fix if needed - https://github.com/bryntum/support/issues/6277


Re: [REACT] timeSpanHighlight not showing after render of page

Posted: Thu Mar 02, 2023 10:59 am
by saki

Re: [REACT] timeSpanHighlight not showing after render of page

Posted: Fri Mar 10, 2023 12:02 pm
by gorakh.nath

I changed the way we are passing listeners and initialise it by using useState as mentioned here https://github.com/bryntum/support/issues/6277#issuecomment-1451514367 , however I am still getting the same issue in my local application.


Re: [REACT] timeSpanHighlight not showing after render of page

Posted: Fri Mar 10, 2023 12:08 pm
by mats

Please provide an updated full test case that we can inspect.