feat: add VnMultiCheck component for multi-selection functionality #1734
No reviewers
Labels
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: verdnatura/salix-front#1734
Loading…
Reference in New Issue
No description provided.
Delete Branch "vnTable_multi_check"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hay un ejemplo hecho en Clientes>Notificaciones
feat: add VnMultiCheck component for multi-selection functionalityto WIP: feat: add VnMultiCheck component for multi-selection functionalityWIP: feat: add VnMultiCheck component for multi-selection functionalityto feat: add VnMultiCheck component for multi-selection functionalityTe fallan un par de test de itemFixedPrice, ns si són intermitentes
@ -113,6 +114,10 @@ const $props = defineProps({
type: Object,
default: () => ({}),
},
multiCheck: {
Esto es subjetivo: yo le pondria de nombre a la variable backMultiCheck
@ -662,3 +685,3 @@
v-bind="$attrs"
:class="$attrs['class'] ?? 'q-px-md'"
:limit="$attrs['limit'] ?? 100"
:limit="$attrs['limit'] ?? 10"
???
Corregido a posterior
@ -700,6 +723,18 @@ const rowCtrlClickFunction = computed(() => {
:hide-selected-banner="true"
:data-cy
>
<template #header-selection>
condicional que sea intencional activarlo ya que solo funcionara con ciertos backs construidos con loopback
Delegamos la responsabilidad en el componente, y segun si la prop es true o false se mostrará el icono
@ -701,2 +724,4 @@
:data-cy
>
<template #header-selection>
{{ $attrs['url'] }}
borrar
corregido a posterior
@ -0,0 +17,4 @@
type: String,
default: null,
required: true,
},
required: true y default: null no tiene sentido
cierto
@ -0,0 +37,4 @@
.then(({ data }) => {
rows.value = data;
})
.catch(console.error);
transparente para el usuario si falla
@ -0,0 +56,4 @@
<QMenu anchor="bottom right" self="top right">
<QList>
<QItem v-ripple clickable @click="$emit('select:all', toRaw(rows))">
{{ t('Select all', { rows: rows.length }) }}
v-text
@ -0,0 +58,4 @@
<QItem v-ripple clickable @click="$emit('select:all', toRaw(rows))">
{{ t('Select all', { rows: rows.length }) }}
</QItem>
<slot name="more-options"></slot>
te sobra 1 etiqueta
He dejado la opcion por si quieres poner a demanda mas opciones
@ -0,0 +68,4 @@
en:
Select all: 'Select all ({rows})'
fr:
Select all: 'Sélectionner tout ({rows})'
de momento solo hacesmo español/ingles