solveConflicts_test_to_dev #957

Merged
alexm merged 58 commits from solveConflicts_test_to_dev into dev 2024-11-18 10:21:51 +00:00
1 changed files with 11 additions and 11 deletions
Showing only changes of commit 045a828bf9 - Show all commits

View File

@ -42,16 +42,15 @@ const arrayData = useArrayData(datakey, {
const { store } = arrayData;
const storeData = computed(() => store.data);
const nodes = ref([
{
const defaultNode = {
id: null,
name: props.rootLabel,
sons: true,
tickable: false,
noTick: true,
children: [{}],
},
]);
};
const nodes = ref([defaultNode]);
const _tickedNodes = computed({
get: () => props.tickedNodes,
@ -131,6 +130,7 @@ function getNodeIds(node) {
watch(storeData, async (val) => {
// Se triggerea cuando se actualiza el store.data, el cual es el resultado del fetch de la searchbar
if (!nodes.value[0]) nodes.value = [defaultNode];
nodes.value[0].childs = [...val];
const fetchedNodeKeys = val.flatMap(getNodeIds);
state.set('Tree', [...fetchedNodeKeys]);