igniteui-angular icon indicating copy to clipboard operation
igniteui-angular copied to clipboard

feat(query-builder): save and restore inner query state on commit/discard

Open igdmdimitrov opened this issue 1 year ago • 2 comments

Closes #

Additional information (check all that apply):

  • [ ] Bug fix
  • [x] New functionality
  • [ ] Documentation
  • [ ] Demos
  • [ ] CI/CD

Checklist:

  • [ ] All relevant tags have been applied to this PR
  • [ ] This PR includes unit tests covering all the new code (test guidelines)
  • [ ] This PR includes API docs for newly added methods/properties (api docs guidelines)
  • [ ] This PR includes feature/README.MD updates for the feature docs
  • [ ] This PR includes general feature table updates in the root README.MD
  • [ ] This PR includes CHANGELOG.MD updates for newly added functionality
  • [ ] This PR contains breaking changes
  • [ ] This PR includes ng update migrations for the breaking changes (migrations guidelines)
  • [ ] This PR includes behavioral changes and the feature specification has been updated with them

igdmdimitrov avatar Oct 17 '24 12:10 igdmdimitrov

@igdmdimitrov Currently, changes, made to conditions on a level where there are other sub-query conditions, are immediately propagated, making discarding the parent sub-query impossible:

  1. Starting in this state: image
  2. Make a change to the first most inner condition > Date created after Oct 15, 2024 to Oct 16, 2024
  3. Commit the condition
  4. Discard the parent > the date created is 16 Oct

Expected result: Date created should be restored to Oct 15.

gedinakova avatar Oct 17 '24 12:10 gedinakova

An expression without return fields could be committed through UI (this was fixed in the base branch) QB_issue15

teodosiah avatar Oct 18 '24 06:10 teodosiah

@igdmdimitrov

  1. In the dev demo, expand the inner query
  2. Clear the return fields
  3. Discard the parent condition

Result: The chip shows no return fields. The tree is correct - the return fields have stayed as initially. Expected result: The UI should properly reflect the tree state.

gedinakova avatar Oct 25 '24 12:10 gedinakova

@igdmdimitrov Found a strange behavior where for some reason the contents of a removed condition are projected to a newly created one

https://github.com/user-attachments/assets/7ce06da8-2e90-40b6-8c52-ad7bf4a77a45

ivanvpetrov avatar Oct 28 '24 16:10 ivanvpetrov