Closed oliviertassinari closed 1 year ago
I think this has the same root cause as https://github.com/mui/mui-toolpad/issues/1126. Tackling https://github.com/mui/mui-toolpad/issues/1126 should solve this issue as well.
It might be related: changing the name of a query doesn't ask for a confirmation:
https://user-images.githubusercontent.com/3165635/196751810-83f84f03-0b71-48e1-9998-f9f8eb34d41a.mov
it's related. The name change input operates directly on the dom (it uses a shared component that's used throughout Toolpad). The rest of the dialog operates on a draft copy. when the dom changes the draft copy gets updated to the actual value in the dom. That's why changing the name resets the fields.
Solution: the name change input needs to operate on the draft copy as well. The part that's slightly tricky will be about how to deal with duplicate names.
@Janpot I assigned this to myself because I thought I could take it but let me know if you think you should take it instead, I can find other tasks.
I was going to take it but wanted to merge https://github.com/mui/mui-toolpad/pull/1149 first
I'll close this ticket as a duplicate of https://github.com/mui/mui-toolpad/issues/1126
Duplicates
Latest version
Current behavior 😯
All my options are lost, transformation, params, etc.
Expected behavior 🤔
The dialog keeps all the options set.
Steps to reproduce 🕹
Steps:
https://api.github.com/repos/mui/mui-x/issues
in the get URL.https://user-images.githubusercontent.com/3165635/195729389-0aeed02e-e5f3-4ea9-9c35-b8e49f389ad9.mov
Context 🔦
I face this problem while I was building a quick UI for Greg to help us with the support on GitHub https://www.notion.so/mui-org/Set-GitHub-scope-labels-12a84fdf50e44595afc55343dac00fca#3f39c7660fc448b1a6c0f554a29a5ce2. If you are interested about the other pains I faced but I didn't open issues for you will find:
But I only open an issue for my biggest pain. BTW, I love the new query UI. Building the whole UI felt fast, I'm not sure I would have been quicker the pro-code way;
Your environment 🌎
v0.0.22