Page 1 of 1

[REACT] Enter Duration saves upon each keystroke

Posted: Fri Jan 27, 2023 8:29 pm
by cturney

Our users encounter an issue when entering values in Duration field. You can see in the example Gantt, that each keystroke, the Duration of the task changes.

So if I type 1, the bar is one day long, then 0 a second later, the bar changes to 10 day duration.

Typing very quickly sends one API request to our backend with 10.
Typing very slowly sends 2 API requests, 1, then 10. Everything is fine.
Typing at a speed such that the second keystroke occurs before the first network request completes sends 2 requests each with 1 as duration

The user sees the duration of the bar extend to 10, then back to 1.


Re: [REACT] Enter Duration saves upon each keystroke

Posted: Fri Jan 27, 2023 8:31 pm
by cturney

Ideally, the request to save the new duration would only occur after leaving the Duration cell or hitting ENTER.

The extra network requests can cause a lot of extra calculations for dependent tasks as well.


Re: [REACT] Enter Duration saves upon each keystroke

Posted: Fri Jan 27, 2023 8:34 pm
by cturney

Video attached

save reverting.mov
(3.82 MiB) Downloaded 19 times

Re: [REACT] Enter Duration saves upon each keystroke

Posted: Fri Jan 27, 2023 9:07 pm
by marcio

Hey cturney,

Thanks for the report and the video. I see that you're not using a demo, are you able to reproduce that in our demos? Or even better, assemble one project with your configuration for us to check, that would help us a lot to assist you.

I couldn't reproduce that in our demos and that's difficult to say without seeing the code. Could be the same problem that you reported in the other issue or could be something different, difficult to say only seeing the video.


Re: [REACT] Enter Duration saves upon each keystroke

Posted: Fri Jan 27, 2023 10:19 pm
by cturney

Hi Marcio,

Are you referring to demos like this one? https://bryntum.com/products/gantt/examples/bigdataset/

That doesn't save any data, so it wouldn't be possible to reproduce the issue here.


Re: [REACT] Enter Duration saves upon each keystroke

Posted: Sat Jan 28, 2023 10:16 am
by mats

We have this ticket opened for this: https://github.com/bryntum/support/issues/6036