properly unset edited properties instead of leaving them as null
This commit is contained in:
parent
e7307d1e19
commit
3ca882f883
|
@ -1,6 +1,6 @@
|
||||||
import { ref, reactive, computed, watch, provide } from 'vue'
|
import { ref, reactive, computed, watch, provide } from 'vue'
|
||||||
import { useStore } from 'vuex'
|
import { useStore } from 'vuex'
|
||||||
import { get, set } from 'lodash'
|
import { get, set, unset } from 'lodash'
|
||||||
|
|
||||||
import Select from 'src/components/select/select.vue'
|
import Select from 'src/components/select/select.vue'
|
||||||
import SelectMotion from 'src/components/select/select_motion.vue'
|
import SelectMotion from 'src/components/select/select_motion.vue'
|
||||||
|
@ -314,7 +314,7 @@ export default {
|
||||||
)
|
)
|
||||||
set(allEditedRules, getPath(component, directive), fallback ?? defaultValue)
|
set(allEditedRules, getPath(component, directive), fallback ?? defaultValue)
|
||||||
} else {
|
} else {
|
||||||
set(allEditedRules, getPath(component, directive), null)
|
unset(allEditedRules, getPath(component, directive))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -334,7 +334,11 @@ export default {
|
||||||
return postProcess(usedRule)
|
return postProcess(usedRule)
|
||||||
},
|
},
|
||||||
set (value) {
|
set (value) {
|
||||||
|
if (value) {
|
||||||
set(allEditedRules, getPath(component, directive), value)
|
set(allEditedRules, getPath(component, directive), value)
|
||||||
|
} else {
|
||||||
|
unset(allEditedRules, getPath(component, directive))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue