mirror of
https://github.com/strapi/strapi.git
synced 2025-11-01 18:33:55 +00:00
Fix prompt on initial render
This commit is contained in:
parent
410073dc05
commit
7358d7eaf2
@ -56,6 +56,14 @@ const ListPage = () => {
|
||||
}
|
||||
}, [search]);
|
||||
|
||||
// Disabling the prompt on the first render if one of the modal is open
|
||||
useEffect(() => {
|
||||
if (search !== '') {
|
||||
togglePrompt(false);
|
||||
}
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, []);
|
||||
|
||||
const attributes = get(modifiedData, mainDataTypeAttributesPath, {});
|
||||
const attributesLength = Object.keys(attributes).length;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user