glib-web 4.15.2 → 4.15.3

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.
@@ -107,16 +107,25 @@ export default {
107
107
  };
108
108
  },
109
109
  computed: {
110
- values() {
110
+ cleanValues() {
111
111
  if (this.model) {
112
112
  // Depends on whether the field is single or multiple
113
- return this.normalizedRows(this.$type.isArray(this.model) ? this.model : [this.model]);
113
+ if (this.$type.isArray(this.model)) {
114
+ return this.model
115
+ } else {
116
+ return [this.model];
117
+ }
114
118
  }
115
- // return [{ value: null }];
116
-
117
- // To avoid empty param error
118
119
  return [];
119
120
  },
121
+ values() {
122
+ const array = this.cleanValues;
123
+ if (array.length > 0) {
124
+ return this.normalizedRows(array);
125
+ }
126
+ // So that the param gets submitted even when there is no selection.
127
+ return [{ value: null }];
128
+ },
120
129
  density() {
121
130
  return determineDensity(this.spec.styleClasses);
122
131
  },
@@ -211,13 +220,13 @@ export default {
211
220
  },
212
221
  updateAllItems() {
213
222
  // Make sure selected items/values are in the mix so they can be displayed in the select field.
214
- this.allItems = this.values.concat(this.items);
223
+ this.allItems = this.cleanValues.concat(this.items);
215
224
  },
216
225
  normalizedRows(rows) {
217
226
  return rows.map(row => {
218
227
  const extra = row.extra || {};
219
228
 
220
- if (!Utils.type.isString(row.value)) {
229
+ if (Utils.type.isNull(row.value)) {
221
230
  row.value = extra.value;
222
231
  }
223
232
 
package/nav/sheet.vue CHANGED
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <v-bottom-sheet v-model="model" inset :opacity="spec.overlay ? undefined : 0">
2
+ <v-bottom-sheet v-model="model" inset>
3
3
  <v-list>
4
4
  <v-list-subheader v-if="spec.message">{{ spec.message }}</v-list-subheader>
5
5
  <template v-for="(button, index) of spec.buttons" :key="index">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glib-web",
3
- "version": "4.15.2",
3
+ "version": "4.15.3",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {