Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for avoiding editing stale data in RestGrid #3808

Open
lbwexler opened this issue Oct 10, 2024 · 1 comment
Open

Support for avoiding editing stale data in RestGrid #3808

lbwexler opened this issue Oct 10, 2024 · 1 comment

Comments

@lbwexler
Copy link
Member

Some ideas Tom and I had:

  1. Best Practice, include lastUpdated in Domain object and view
  2. Refresh Data before showing edit dialog
  3. Potentially look at version flag before submit of updates and warn user.

Re: 2 -- should we update entire grid or just record of interest? If entire grid, could make working with it laggy, but could also combine with changes to do a smart refresh only if data had changed by checking timestamps

@amcclain
Copy link
Member

We could refresh the entire grid but in a non-blocking way - ie show the dialog, allow the user to potentially start inputting edits, but keep the save button disabled until a refresh has happened.

If the refresh updates other records, we could let the user proceed as they were. If the refresh updates the record under edit, we'd have to do something like show a modal alert or (better) banner with an option to reload the form with the latest data. At that point I think we should go ahead and drop any already-entered user changes - it's a shame for that user, but should be a pretty rare edge case.

I don't think we should require a lastUpdated timestamp - although agreed we could write code that leveraged it if available, but would have to fall back on some more complete comparison.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants