@bildvitta/quasar-ui-asteroid 3.1.0 → 3.1.1-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/asteroid.cjs.css +1 -1
- package/dist/asteroid.cjs.js +11 -3
- package/dist/asteroid.cjs.min.js +2 -2
- package/dist/asteroid.esm.css +1 -1
- package/dist/asteroid.esm.js +11 -3
- package/dist/asteroid.esm.min.js +2 -2
- package/dist/asteroid.umd.css +1 -1
- package/dist/asteroid.umd.js +11 -3
- package/dist/asteroid.umd.min.js +2 -2
- package/package.json +1 -1
- package/src/components/nested-fields/QasNestedFields.vue +9 -1
package/package.json
CHANGED
|
@@ -320,8 +320,16 @@ export default {
|
|
|
320
320
|
return this.$emit('update:modelValue', value || this.nested)
|
|
321
321
|
},
|
|
322
322
|
|
|
323
|
+
/*
|
|
324
|
+
* Se o item que for removido não tiver o identificador (uuid por ex) e "useRemoveOnDestroy" for "false"
|
|
325
|
+
* ou "useRemoveOnDestroy" for "true" removemos o item do array, senão adicionamos a flag [destroyKey]
|
|
326
|
+
* no item referente do array.
|
|
327
|
+
*
|
|
328
|
+
* Ex: ao adicionar um item e remover sem salvar, mesmo que useRemoveOnDestroy for false ele será removido
|
|
329
|
+
* ao invés de adicionar a flag [destroyKey]
|
|
330
|
+
*/
|
|
323
331
|
destroy (index, row) {
|
|
324
|
-
!row[this.identifierItemKey]
|
|
332
|
+
!row[this.identifierItemKey] || this.useRemoveOnDestroy
|
|
325
333
|
? this.nested.splice(index, 1)
|
|
326
334
|
: this.nested.splice(index, 1, { [this.destroyKey]: true, ...row })
|
|
327
335
|
|