warmFix_hasMoreData #308
No reviewers
Labels
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: verdnatura/salix-front#308
Loading…
Reference in New Issue
No description provided.
Delete Branch "warmFix_hasMoreData"
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?
New commits pushed, approval review dismissed automatically according to repository settings
Y el porque de esta por?
Por el código que he visto deshace lo que hice del error de listado de proveedores
En que parte falla? @alexm @jorgep
Sin el .value en VnPagiante el scroll del listado de proveedores falla
New commits pushed, approval review dismissed automatically according to repository settings
@ -79,3 +79,3 @@
});
const hasMoreData = ref();
const store = arrayData.store;
const hasMoreData = arrayData.hasMoreData;
copia de la propiedad computed
@ -189,3 +186,3 @@
:offset="offset"
:disable="disableInfiniteScroll || !arrayData.hasMoreData"
class="full-width"
:disable="disableInfiniteScroll || !hasMoreData"
Al hacer una copia de la propiedad computed dentro del componente, se puede usar con normalidad la propiedad. Si se quiere hacer arrayData.hasMoreData , hay que añadir .value Si no, no funciona y es muy lioso porque de normal no se hace .value dentro del template.
@ -98,3 +98,2 @@
const { limit } = filter;
hasMoreData.value = limit && response.data.length >= limit;
store.hasMoreData = hasMoreData.value;
arrayDataStore.hasMoreData = limit && response.data.length >= limit;
Actualiza la prop.
@ -22,6 +20,7 @@ export function useArrayData(key, userOptions) {
onMounted(() => {
setOptions();
store.skip = 0;
Al cambiar de página se seguía manteniendo el filtro aplicado. Con esto se setea a cero y cuando lo vuelves a montar se cargan los registros desde el principio.
New commits pushed, approval review dismissed automatically according to repository settings
New commits pushed, approval review dismissed automatically according to repository settings
@ -98,3 +94,2 @@
const { limit } = filter;
hasMoreData.value = limit && response.data.length >= limit;
store.hasMoreData = hasMoreData.value;
store.hasMoreData = limit && response.data.length >= limit;
Lo he puesto así porque esta propiedad la queremos a nivel de store (ej. workerList), además estaba resultando muy difícil mockear una propiedad computed .