Skip to content

Commit

Permalink
Fix tag search
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Ng <chrng8@gmail.com>
  • Loading branch information
Pytal committed Feb 13, 2023
1 parent ac7a84c commit a924e09
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
8 changes: 8 additions & 0 deletions src/components/NcSelect/NcSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,14 @@ export default {
}),
},
/**
* Sets the maximum number of options to display in the dropdown list
*/
limit: {
type: Number,
default: null,
},
/**
* Disable the component
*
Expand Down
19 changes: 15 additions & 4 deletions src/components/NcSelectTags/NcSelectTags.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ export default {
```

### Custom filter
Because of compatibility reasons only 5 tag entries are shown by default. If you want to show all available tags set the `optionsFilter` function-prop to `null`:
Because of compatibility reasons only 5 tag entries are shown by default. If you want to show all available tags set the `limit` prop to `null`:
```vue
<template>
<div class="wrapper">
<NcSelectTags v-model="value" :options-filter="null" />
<NcSelectTags v-model="value" :limit="null" />
{{ value }}
</div>
</template>
Expand Down Expand Up @@ -192,6 +192,17 @@ export default {
},
},
/**
* Sets the maximum number of tags to display in the dropdown list
*
* Because of compatibility reasons only 5 tag entries are shown by
* default
*/
limit: {
type: Number,
default: 5,
},
/**
* Allow selection of multiple options
*
Expand All @@ -210,7 +221,7 @@ export default {
*/
optionsFilter: {
type: Function,
default: (_element, index) => index < 5,
default: null,
},
/**
Expand Down Expand Up @@ -280,7 +291,7 @@ export default {
propsToForward() {
const {
// Props handled by the component itself
// Props handled by this component
optionsFilter,
// Props to forward
...propsToForward
Expand Down

0 comments on commit a924e09

Please sign in to comment.