mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
* Prevent multiple call to backend from UI - Prevent multiple calls to backend from UI on updating the filters * Committing the fix - Watch only for the combined change in typesFilter and actionTypesFilter * UseEffect on string of typeFilter and actionTypeFilter - We are only concerned about the values of the two props and not whether the object references change. In other words, two separate empty arrays should be same for us. Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Sushrut Kasture <kasturesushrut@gmail.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
parent
af2aab60db
commit
0064037273
1 changed files with 6 additions and 1 deletions
|
@ -93,7 +93,12 @@ export const AlertsList: React.FunctionComponent = () => {
|
|||
useEffect(() => {
|
||||
loadAlertsData();
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [alertTypesState, page, searchText, typesFilter, actionTypesFilter]);
|
||||
}, [alertTypesState, page, searchText]);
|
||||
|
||||
useEffect(() => {
|
||||
loadAlertsData();
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [JSON.stringify(typesFilter), JSON.stringify(actionTypesFilter)]);
|
||||
|
||||
useEffect(() => {
|
||||
(async () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue