0
0
Fork 0

feat: handle qCheckbox 3rd state

This commit is contained in:
Javier Segarra 2024-07-04 17:31:40 +02:00
parent b3ea05fb32
commit b781940c77
1 changed files with 6 additions and 2 deletions

View File

@ -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