@volverjs/ui-vue 0.0.6 → 0.0.7-beta.1

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.
@@ -160,14 +160,10 @@
160
160
  dirty: isDirty.value,
161
161
  focus: focused.value,
162
162
  floating: floating.value,
163
+ badges: props.badges,
163
164
  })),
164
165
  )
165
166
 
166
- // current options, filtered or prop options
167
- const hasOptions = computed(() =>
168
- props.searchable ? filteredOptions.value : props.options,
169
- )
170
-
171
167
  const {
172
168
  getOptionLabel,
173
169
  getOptionValue,
@@ -302,7 +298,7 @@
302
298
  disabled: disabled.value,
303
299
  readonly: readonly.value,
304
300
  modifiers: props.modifiers,
305
- options: hasOptions.value,
301
+ options: props.options,
306
302
  labelKey: props.labelKey,
307
303
  valueKey: props.valueKey,
308
304
  icon: props.icon,
@@ -339,16 +335,20 @@
339
335
  }))
340
336
 
341
337
  // computed
342
- onKeyStroke([' ', 'Enter'], (e) => {
343
- if (props.autoOpen) {
344
- return
345
- }
346
- if (!expanded.value && focused.value) {
347
- e.preventDefault()
348
- e.stopImmediatePropagation()
349
- toggleExpanded()
350
- }
351
- })
338
+ onKeyStroke(
339
+ [' ', 'Enter'],
340
+ (e) => {
341
+ if (props.autoOpen) {
342
+ return
343
+ }
344
+ if (!expanded.value && focused.value) {
345
+ e.preventDefault()
346
+ e.stopImmediatePropagation()
347
+ toggleExpanded()
348
+ }
349
+ },
350
+ { target: inputEl },
351
+ )
352
352
  </script>
353
353
 
354
354
  <template>
@@ -422,9 +422,12 @@
422
422
  v-bind="{ selectedOptions, onInput }"
423
423
  >
424
424
  <template v-if="hasValue">
425
- <template v-if="!badges">
425
+ <div
426
+ v-if="!badges"
427
+ class="vv-select__value"
428
+ >
426
429
  {{ hasValue }}
427
- </template>
430
+ </div>
428
431
  <VvBadge
429
432
  v-for="(
430
433
  option, index
@@ -334,7 +334,11 @@
334
334
  }
335
335
  })
336
336
  onKeyStroke([' ', 'Enter'], (e) => {
337
- if (expanded.value && focused.value) {
337
+ if (
338
+ expanded.value &&
339
+ focused.value &&
340
+ e.target !== document.activeElement
341
+ ) {
338
342
  e.preventDefault()
339
343
  const activeElement = document.activeElement as HTMLElement
340
344
  activeElement.click()