Skip to content
Snippets Groups Projects
Commit 745f8d5a authored by Elora-V's avatar Elora-V
Browse files

essai watcher

parent f4635f92
No related branches found
No related tags found
No related merge requests found
...@@ -162,7 +162,7 @@ ...@@ -162,7 +162,7 @@
// Vue // Vue
import { reactive, onMounted, Ref, ref ,watch, PropType, computed} from 'vue'; import { reactive, onMounted, Ref, ref ,watch, PropType, computed, watchEffect} from 'vue';
// Components // Components
import ParamDropDown from './ParamComp/ParamDropDownComp.vue'; import ParamDropDown from './ParamComp/ParamDropDownComp.vue';
...@@ -268,8 +268,7 @@ watch( parameters, (newValue, oldValue) => { ...@@ -268,8 +268,7 @@ watch( parameters, (newValue, oldValue) => {
// change default spacing on style change // change default spacing on style change
watch( watchEffect(
() => props.networkStyle,
() => { () => {
// Update spacing based on the new style object (mean of all possible size) // Update spacing based on the new style object (mean of all possible size)
if(props.networkStyle){ if(props.networkStyle){
...@@ -280,9 +279,7 @@ watch( ...@@ -280,9 +279,7 @@ watch(
} }
} }
}, });
{ immediate: true, deep:true } // Run the watcher immediately on mount
);
/////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////
//---------------------- Functionnalities ------------------------- //---------------------- Functionnalities -------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment