-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] FindAndReplaceSidePanel: Fix range update
How to reproduce: - Open the F&R SidePanel. - Choose the 'Specific Range' Search Option from the dropdown. - Attempt to pick a large range from the grid. The component SelectionInput heavily relies on the fact its props are updated by the parent component after SelectionInput invoked `props.onSelectionChanged`. The dataRange stored in the component `FindAndReplacePanel` was not observed, which means the after `SelectionInput` called `onSelectionChanged`, the update of the datarange would not update the props passed to `SelectionInput`. This would cause a desynchronized state which lead to an infinite loop because one of the conditions in `SelectionInput.onWillUpdateProps` would be triggered 100% of the time and the said condition unfortunately updates a store, then forcing a render(true), hence the infinite loop. In this revision, we fix the bad state management of `FindAndReplace` but is seems again that `SelectionInput` is wobbly, so is using it. We should try to fix its behaviour once and for all. closes #4406 Task: 3972409 X-original-commit: a445f51 Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
- Loading branch information
Showing
3 changed files
with
40 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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 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 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