mirror of
https://github.com/Choices-js/Choices.git
synced 2024-05-25 10:02:40 +02:00
Merge pull request #1021 from Choices-js/fix-param
Fix type for parameter on setChoiceByValue
This commit is contained in:
commit
20d3f5cd55
|
@ -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) {
|
(function webpackUniversalModuleDefinition(root, factory) {
|
||||||
if(typeof exports === 'object' && typeof module === 'object')
|
if(typeof exports === 'object' && typeof module === 'object')
|
||||||
module.exports = factory();
|
module.exports = factory();
|
||||||
|
|
2
public/types/src/scripts/choices.d.ts
vendored
2
public/types/src/scripts/choices.d.ts
vendored
|
@ -66,7 +66,7 @@ declare class Choices implements Choices {
|
||||||
hideDropdown(preventInputBlur?: boolean): this;
|
hideDropdown(preventInputBlur?: boolean): this;
|
||||||
getValue(valueOnly?: boolean): string[] | Item[] | Item | string;
|
getValue(valueOnly?: boolean): string[] | Item[] | Item | string;
|
||||||
setValue(items: string[] | Item[]): this;
|
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),
|
* 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.
|
* a value field name and a label field name.
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -553,7 +553,7 @@ class Choices implements Choices {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
setChoiceByValue(value: string): this {
|
setChoiceByValue(value: string | string[]): this {
|
||||||
if (!this.initialised || this._isTextElement) {
|
if (!this.initialised || this._isTextElement) {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue