diff --git a/README.md b/README.md index cc22f9a..7cff83b 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ ## Installation ```bash -npm install @singularit/multiselect@beta +npm install @singularit/multiselect ``` @@ -27,14 +27,14 @@ npm install @singularit/multiselect@beta | **selectOptions** | `array` | `[]` | Array of options that can be selected. An option should look like this: `{value: ..., label: '...', ...}`. | | **placeholder** | `string` | `''` | The placeholder string will be displayed if no option is selected. | | **optionLabel** | `function` | | Function that determines which attribute of the option object should be displayed as label. The passed parameters are an option and an array of all selected options. By default, it returns the label attribute of the passed option. | -| **optionValue** | `function` | | Function that determines which attribute of the option object should be used as value. The passed parameters are an option and an array of all selected options. By default, it returns the value attribute of the passed option. | +| **optionValue** | `function` | | Function that determines which attribute of the option object should be used as value. Passes an option as parameter. By default, it returns the value attribute of the passed option. | | **optionDisabled** | `function` | | Function which determines if an option is disabled. The passed parameters are an option and an array of all selected options. By default, it returns the disabled attribute of the passed option. | | **displaySelectedValues** | function|string | | Determines what is displayed in the value display. Can be a string or a function returning a string. The passed parameter of the function is an array of all selected options. By default the amount of selected options will be displayed in multiselect and the `optionValue` of an option in single select. | | **clearable** | `boolean` | `true` | Whether all selected options can be cleared. | | **disabled** | `boolean` | `false` | Disables the component. Values can still be pushed into the model value externally. | | **searchable** | `boolean` | `false` | Whether options can be searched. | | **searchProps** | `object` | | Allows passing HTML input attributes to the search input element. | -| **optionSearchValue** | `function` | | Determines which value of the option Object is searched.It is a function which returns the value of an option that is tracked by the search input.The passed parameters are an option and an array of all selected options.By default, it returns the label of the passed option. | +| **optionSearchValue** | `function` | | Determines which value of the option Object is searched. It is a function which returns the value of an option that is tracked by the search input. Passes an option as parameter. By default, it returns the label of the passed option. | | **selectProps** | `object` | | Allows passing HTML select attributes to the hidden select element. | | **closeOnSelect** | `boolean` | `false` | Whether the selection dropdown should automatically be closed after selecting/deselection an option. | | **noOptionsText** | `string` | `'Die Liste ist leer'` | Text that is displayed if no options are given. | diff --git a/src/Multiselect.vue b/src/Multiselect.vue index 9dab941..acd1c23 100644 --- a/src/Multiselect.vue +++ b/src/Multiselect.vue @@ -67,7 +67,7 @@ >
  • - {{ optionLabel(option,selectedOptions) }} + {{ optionLabel(option) }}
  • @@ -189,7 +189,7 @@ export default defineComponent({ * By default, it returns the value attribute of the passed option. */ optionValue: { - type: Function as PropType<((option: Option | unknown, selectedOptions: Array