@bildvitta/quasar-ui-asteroid 3.10.0-beta.5 → 3.10.0-beta.7

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bildvitta/quasar-ui-asteroid",
3
3
  "description": "Asteroid",
4
- "version": "3.10.0-beta.5",
4
+ "version": "3.10.0-beta.7",
5
5
  "author": "Bild & Vitta <systemteam@bild.com.br>",
6
6
  "license": "MIT",
7
7
  "main": "dist/asteroid.cjs.min.js",
@@ -1,15 +1,15 @@
1
1
  <template>
2
2
  <div :id="fieldName" class="qas-nested-fields">
3
- <div class="text-left">
4
- <qas-label v-if="useSingleLabel" :label="fieldLabel" margin="lg" />
3
+ <div v-if="useSingleLabel" class="text-left">
4
+ <qas-label :label="fieldLabel" margin="lg" />
5
5
  </div>
6
6
 
7
7
  <div ref="inputContent">
8
8
  <component :is="componentTag" v-bind="componentProps">
9
9
  <template v-for="(row, index) in nested" :key="`row-${index}`">
10
10
  <div v-if="!row[destroyKey]" :id="`row-${index}`" class="full-width q-mt-md qas-nested-fields__field-item">
11
- <header v-if="hasHeader" class="flex items-center" :class="headerClasses">
12
- <qas-label v-if="!useSingleLabel" :label="getRowLabel(index)" />
11
+ <header v-if="hasHeader" class="flex items-center q-pb-md" :class="headerClasses">
12
+ <qas-label v-if="!useSingleLabel" :label="getRowLabel(index)" margin="none" />
13
13
  <qas-actions-menu v-if="hasBlockActions(row)" v-bind="actionsMenuProps" :list="getActionsList(index, row)" />
14
14
  </header>
15
15
 
@@ -291,15 +291,13 @@ export default {
291
291
  },
292
292
 
293
293
  hasHeader () {
294
- return !this.useInlineActions
294
+ return (this.useSingleLabel && !this.useInlineActions) || !this.useSingleLabel
295
295
  },
296
296
 
297
297
  headerClasses () {
298
298
  return {
299
299
  'justify-end': this.useSingleLabel,
300
- 'justify-between': !this.useSingleLabel,
301
- 'q-pb-sm': this.useSingleLabel,
302
- 'q-pb-md': !this.useInlineActions
300
+ 'justify-between': !this.useSingleLabel
303
301
  }
304
302
  }
305
303
  },
@@ -275,9 +275,20 @@ export default {
275
275
  /*
276
276
  * pode ser que as opções sejam inicializadas após o primeiro fetch de opções
277
277
  * fazendo com que as opções sobrescreva as que vieram através do fetch, então é
278
- * preciso tratar para nestes casos serem incrementadas ao invés de sobrescrever.
278
+ * preciso tratar para nestes casos serem incrementadas ao invés de sobrescrever,
279
+ * mas antes é preciso verificar se já não existe nas opções filtradas para não duplicar.
279
280
  */
280
281
  if (this.mx_fetchCount === 1) {
282
+ options.forEach(option => {
283
+ const index = this.mx_filteredOptions.findIndex(filteredOption => {
284
+ return filteredOption.value === option.value
285
+ })
286
+
287
+ if (~index) {
288
+ this.mx_filteredOptions.splice(index, 1)
289
+ }
290
+ })
291
+
281
292
  this.mx_filteredOptions.unshift(...options)
282
293
  } else {
283
294
  this.mx_filteredOptions = [...options]