Fix type for parameter on setChoiceByValue

This commit is contained in:
Matt Triff 2022-03-13 17:22:37 -04:00
parent 08d4f1fee7
commit f63201d929
4 changed files with 4 additions and 4 deletions

View file

@ -1,4 +1,4 @@
/*! choices.js v10.0.0 | © 2022 Josh Johnson | https://github.com/jshjohnson/Choices#readme */
/*! choices.js v10.1.0 | © 2022 Josh Johnson | https://github.com/jshjohnson/Choices#readme */
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();

View file

@ -66,7 +66,7 @@ declare class Choices implements Choices {
hideDropdown(preventInputBlur?: boolean): this;
getValue(valueOnly?: boolean): string[] | Item[] | Item | string;
setValue(items: string[] | Item[]): this;
setChoiceByValue(value: string): this;
setChoiceByValue(value: string | string[]): this;
/**
* Set choices of select input via an array of objects (or function that returns array of object or promise of it),
* a value field name and a label field name.

File diff suppressed because one or more lines are too long

View file

@ -553,7 +553,7 @@ class Choices implements Choices {
return this;
}
setChoiceByValue(value: string): this {
setChoiceByValue(value: string | string[]): this {
if (!this.initialised || this._isTextElement) {
return this;
}