-
Notifications
You must be signed in to change notification settings - Fork 160
fix(grid): fixed advancedFilteringExpressionsTree rehydration #15500 #15506
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
Merged
Merged
Changes from 8 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
0bb0c39
fix(grid): fixed advancedFilteringExpressionsTree rehydration #15500
Otixa 0d2cda4
chore(filtering): Added an extra explanation to the filtering rehydra…
Otixa 1a7065e
fix(filtering): Fixed expression tree rehydrating before columns are …
Otixa a367614
test(*): Adding a test for binding the tree to a deserialized object.
gedinakova d27f0cb
fix(filtering): Made optional fields accept null values
Otixa 9694356
Merge branch 'master' into filtering-15500
kdinev 81fdcf6
test(Filtering): Adding a test for a declared IExpressionTree object.
gedinakova 25f2e32
test(Filtering): Adding one more IExpressionTree test.
gedinakova 7a85534
chore(*): Applied review suggestions
Otixa 821dfe6
Merge branch 'filtering-15500' of https://github.com/IgniteUI/igniteu…
Otixa 58c382e
Merge branch 'master' into filtering-15500
Otixa 4638d08
chore(filtering): Reverted null in returnFields array
Otixa 1828892
Merge branch 'master' into filtering-15500
damyanpetev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1856,8 +1856,8 @@ export abstract class IgxGridBaseDirective implements GridType, | |
} | ||
|
||
value.type = FilteringExpressionsTreeType.Regular; | ||
if (value && this.columns) { | ||
this._filteringExpressionsTree = recreateTreeFromFields(value, this.columns) as IFilteringExpressionsTree; | ||
if (value && this._columns && this._columns.length > 0) { | ||
Otixa marked this conversation as resolved.
Show resolved
Hide resolved
|
||
this._filteringExpressionsTree = recreateTreeFromFields(value, this._columns) as IFilteringExpressionsTree; | ||
} else { | ||
this._filteringExpressionsTree = value; | ||
} | ||
|
@@ -1906,7 +1906,11 @@ export abstract class IgxGridBaseDirective implements GridType, | |
|
||
if (value && isTree(value)) { | ||
value.type = FilteringExpressionsTreeType.Advanced; | ||
this._advancedFilteringExpressionsTree = recreateTreeFromFields(value, this.columns) as IFilteringExpressionsTree; | ||
if (this._columns && this._columns.length > 0) { | ||
this._advancedFilteringExpressionsTree = recreateTreeFromFields(value, this._columns) as IFilteringExpressionsTree; | ||
} else { | ||
this._advancedFilteringExpressionsTree = value; | ||
} | ||
this.filteringPipeTrigger++; | ||
} else { | ||
this._advancedFilteringExpressionsTree = null; | ||
|
@@ -6607,6 +6611,9 @@ export abstract class IgxGridBaseDirective implements GridType, | |
if (this._columns && this._filteringExpressionsTree) { | ||
this._filteringExpressionsTree = recreateTreeFromFields(this._filteringExpressionsTree, this.columns) as IFilteringExpressionsTree; | ||
} | ||
if (this._columns && this._advancedFilteringExpressionsTree) { | ||
this._advancedFilteringExpressionsTree = recreateTreeFromFields(this._advancedFilteringExpressionsTree, this.columns) as IFilteringExpressionsTree; | ||
} | ||
this.resetCaches(); | ||
} | ||
|
||
|
@@ -6668,9 +6675,12 @@ export abstract class IgxGridBaseDirective implements GridType, | |
this.autogenerateColumns(); | ||
} else { | ||
this._columns = this.getColumnList(); | ||
if (this._columns && this._filteringExpressionsTree) { | ||
this._filteringExpressionsTree = recreateTreeFromFields(this._filteringExpressionsTree, this._columns) as IFilteringExpressionsTree; | ||
} | ||
} | ||
if (this._columns && this._filteringExpressionsTree) { | ||
this._filteringExpressionsTree = recreateTreeFromFields(this._filteringExpressionsTree, this._columns) as IFilteringExpressionsTree; | ||
} | ||
if (this._columns && this._advancedFilteringExpressionsTree) { | ||
this._advancedFilteringExpressionsTree = recreateTreeFromFields(this._advancedFilteringExpressionsTree, this._columns) as IFilteringExpressionsTree; | ||
Comment on lines
+6679
to
+6683
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. At some point we might want to dedupe this into a private function we can call in all places :) |
||
} | ||
|
||
this.initColumns(this._columns, (col: IgxColumnComponent) => this.columnInit.emit(col)); | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.