@enso-ui/select 3.0.8 → 3.0.12

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@enso-ui/select",
3
- "version": "3.0.8",
3
+ "version": "3.0.12",
4
4
  "description": "Select",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/bulma/Tag.vue CHANGED
@@ -25,6 +25,8 @@ export default {
25
25
  required: true,
26
26
  },
27
27
  },
28
+
29
+ emits: ['deselect'],
28
30
  };
29
31
  </script>
30
32
 
@@ -58,15 +58,15 @@
58
58
  <dropdown-indicator :open="open" v-if="!disabled"/>
59
59
  </button>
60
60
  </template>
61
- <template #controls
61
+ <template #controls="{ keydown }"
62
62
  v-if="needsSearch">
63
- <div class="dropdown-item search">
63
+ <div class="search">
64
64
  <div class="control has-icons-right">
65
65
  <input class="input"
66
66
  v-bind="filterBindings"
67
67
  type="text"
68
68
  :placeholder="i18n(labels.search)"
69
- v-on="filterEvents"
69
+ v-on="{ ...filterEvents, keydown }"
70
70
  v-focus>
71
71
  <search-mode class="is-right icon is-small search-mode"
72
72
  v-bind="modeBindings"
@@ -199,6 +199,8 @@ export default {
199
199
 
200
200
 
201
201
  <style lang="scss">
202
+ @import 'bulma/sass/utilities/derived-variables';
203
+
202
204
  .vue-select {
203
205
  .dropdown {
204
206
  width: 100%;
@@ -211,6 +213,10 @@ export default {
211
213
  height: unset;
212
214
  min-height: 2.2125em;
213
215
 
216
+ &.has-error {
217
+ border-color: $danger;
218
+ }
219
+
214
220
  .control-display {
215
221
  &.with-clear-button {
216
222
  max-width: calc(100% - 2.5em);
@@ -291,25 +297,25 @@ export default {
291
297
  .dropdown-content {
292
298
  width: 100%;
293
299
 
300
+ .search {
301
+ padding: 0 0.375rem 0.6rem;
302
+
303
+ .input {
304
+ height: 2em;
305
+ }
306
+
307
+ .search-mode {
308
+ right: 0.3em;
309
+ pointer-events: all;
310
+ }
311
+ }
312
+
294
313
  .dropdown-item {
295
314
  text-overflow: ellipsis;
296
315
  overflow-x: hidden;
297
316
  white-space: nowrap;
298
317
  padding: 0.375rem 2rem 0.375rem 0.6rem;
299
318
 
300
- &.search {
301
- padding: 0 0.375rem 0.6rem;
302
-
303
- .input {
304
- height: 2em;
305
- }
306
-
307
- .search-mode {
308
- right: 0.3em;
309
- pointer-events: all;
310
- }
311
- }
312
-
313
319
  .label.tag {
314
320
  position: absolute;
315
321
  padding: 0.3rem;
@@ -102,10 +102,12 @@ export default {
102
102
  },
103
103
 
104
104
  emits: [
105
- 'add-tag', 'clear', 'deselect', 'fetch', 'select',
105
+ 'add-tag', 'clear', 'deselect', 'fetch', 'input', 'select',
106
106
  'selection', 'update', 'update:modelValue',
107
107
  ],
108
108
 
109
+ inheritAttrs: false,
110
+
109
111
  data: v => ({
110
112
  allowsSelection: true,
111
113
  internalValue: null,
@@ -359,7 +361,7 @@ export default {
359
361
  },
360
362
  reload() {
361
363
  if (!this.hasOptions && !this.readonly && !this.disabled) {
362
- this.fetch();
364
+ this.fetchIfServerSide();
363
365
  }
364
366
  },
365
367
  requestParams() {