Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(NcSelect): Action input usage #4066

Merged
merged 1 commit into from May 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/NcActionInput/NcActionInput.vue
Expand Up @@ -181,7 +181,7 @@ For the multiselect component, all events will be passed through. Please see the
:placeholder="text"
:disabled="disabled"
:append-to-body="false"
:class="{ focusable: isFocusable }"
:input-class="{ focusable: isFocusable }"
class="action-input__multi"
v-bind="$attrs"
v-on="$listeners" />
Expand Down
16 changes: 16 additions & 0 deletions src/components/NcSelect/NcSelect.vue
Expand Up @@ -483,6 +483,11 @@
v-bind="propsToForward"
v-on="$listeners"
@search="searchString => search = searchString">
<template #search="{ attributes, events }">
<input :class="['vs__search', inputClass]"
v-bind="attributes"
v-on="events">
</template>
<template #open-indicator="{ attributes }">
<ChevronDown v-bind="attributes"
fill-color="var(--vs-controls-color)"
Expand Down Expand Up @@ -655,6 +660,16 @@
default: null,
},

/**
* Class for the `input`
*
* Necessary for use in NcActionInput
*/
inputClass: {
type: [String, Object],
default: null,
},

/**
* Input element id
*
Expand Down Expand Up @@ -721,7 +736,7 @@
/**
* Array of options
*
* @type {Array<string | number | { [key: string | number]: any }>}

Check warning on line 739 in src/components/NcSelect/NcSelect.vue

View workflow job for this annotation

GitHub Actions / eslint

Syntax error in type: Array<string | number | { [key: string | number]: any }>
*
* @see https://vue-select.org/api/props.html#options
*/
Expand Down Expand Up @@ -766,7 +781,7 @@
*
* The `v-model` directive may be used for two-way data binding
*
* @type {string | number | { [key: string | number]: any } | Array<any>}

Check warning on line 784 in src/components/NcSelect/NcSelect.vue

View workflow job for this annotation

GitHub Actions / eslint

Syntax error in type: string | number | { [key: string | number]: any } | Array<any>
*
* @see https://vue-select.org/api/props.html#value
*/
Expand Down Expand Up @@ -887,6 +902,7 @@
propsToForward() {
const {
// Props handled by this component
inputClass,
noWrap,
placement,
userSelect,
Expand Down