Skip to content

Fixes ISSUE-48380: no new records should be created when a grid is loading

It should not be possible to create new records while a grid is being reloaded, because when the data load response is received, it will delete from the local data the records that were created while the grid was loaded.

To disable the creation of new records the following actions have been done:

  • The disable logic of the toolbar buttons now check if the grid is being loaded. To check it is uses the same logic ListGrid does, but regretfully it is not included in a visible function so it needs to be repeated.
  • The buttons are updated just before making a request to load the grid data, to let them react to the grid being loaded

Other considerations:

  • These has been no need to disable record creation using short keys (Ctrl+i, Ctrl+d), because those were already not being applied when the grid was loading
  • There was already a call to updateButtonState when the datasource response is received.
  • Buttons are properly reenabled when data is received, when there requests results in an exception in the backend and also when the request times out
  • Lazy filtering works properly, buttons are initially enabled and will not be disabled until the user explicitely load the grid

Try run: https://builds.openbravo.com/job/try-init/1244/console

Edited by Augusto Mauch

Merge request reports