forked from verdnatura/salix-front
feat: handle qCheckbox 3rd state
This commit is contained in:
parent
b3ea05fb32
commit
b781940c77
|
@ -65,6 +65,10 @@ const fetchFixedPrices = async () => {
|
|||
};
|
||||
|
||||
const onFixedPricesFetched = (data) => {
|
||||
data.forEach((item) => {
|
||||
console.log(item.hasMinPrice);
|
||||
item.hasMinPrice = `${item.hasMinPrice !== 0}`;
|
||||
});
|
||||
fixedPrices.value = data;
|
||||
// el objetivo de guardar una copia de las rows es evitar guardar cambios si la data no cambió al disparar los eventos
|
||||
fixedPricesOriginalData.value = JSON.parse(JSON.stringify(data));
|
||||
|
@ -495,8 +499,8 @@ onUnmounted(() => (stateStore.rightDrawer = false));
|
|||
<QCheckbox
|
||||
:model-value="props.row.hasMinPrice"
|
||||
@update:model-value="updateMinPrice($event, props)"
|
||||
:false-value="0"
|
||||
:true-value="1"
|
||||
:true-value="'true'"
|
||||
:false-value="'false'"
|
||||
:toggle-indeterminate="false"
|
||||
/>
|
||||
<VnInput
|
||||
|
|
Loading…
Reference in New Issue