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

Inconsistent onchange results #536

Open
himanshupatil363 opened this issue Apr 17, 2024 · 3 comments
Open

Inconsistent onchange results #536

himanshupatil363 opened this issue Apr 17, 2024 · 3 comments

Comments

@himanshupatil363
Copy link

himanshupatil363 commented Apr 17, 2024

We have a conditional save button for fortunesheet which checks if the previous state and updates state is same then it will be enabled for user to save. In followig scenario we are getting inconsistent results in onchange:
1)When we copy paste something it gives some additional keys named - luckysheet_alternateformat_save:[] , luckysheet_conditionformat_save:[], luckysheet_select_save.
2)We save the state in db.
3)When user comes back to the page onChange runs while rendering the page and checks if previous state(saved in db) and current state is same at this time we dont get the additional keys we got at 1st point which makes the save button enabled all the time if we have saved any report after copy paste.

Data we are getting for the same sheet should be consistent is there any workaround for this.
Also does those keys have signifance in rendering the fortunesheet if not can we ignore those while saving data in db so that this conflict wont occur.

@sanchit3008
Copy link
Collaborator

if i understand correctly, you want to enable a save button if the sheet is dirty as compared to the last state?

@himanshupatil363
Copy link
Author

yes

@sanchit3008
Copy link
Collaborator

id suggest using the onOp function, and then reading the operation and enabling the save button on the basis of what was changed

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