refactor: Improve InputGlobalComponent behavior and data handling
This commit is contained in:
parent
111def3d4a
commit
64eb2e0f99
1 changed files with 3 additions and 3 deletions
|
|
@ -34,8 +34,8 @@ export default function InputGlobalComponent({
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (data)
|
if (data)
|
||||||
if (
|
if (
|
||||||
globalVariablesEntries &&
|
((globalVariablesEntries &&
|
||||||
!globalVariablesEntries.includes(data.value) &&
|
!globalVariablesEntries.includes(data.value))||!globalVariablesEntries) &&
|
||||||
data.load_from_db
|
data.load_from_db
|
||||||
) {
|
) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|
@ -43,7 +43,7 @@ export default function InputGlobalComponent({
|
||||||
setDb(false);
|
setDb(false);
|
||||||
}, 100);
|
}, 100);
|
||||||
}
|
}
|
||||||
}, [globalVariablesEntries]);
|
}, [globalVariablesEntries,data]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!data.value && data.display_name) {
|
if (!data.value && data.display_name) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue