mirror of
https://github.com/Choices-js/Choices.git
synced 2024-05-06 23:56:34 +02:00
Version 10.0.0
This commit is contained in:
parent
ce3d1111d8
commit
3d42067bbd
2
package-lock.json
generated
2
package-lock.json
generated
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "choices.js",
|
"name": "choices.js",
|
||||||
"version": "9.1.0",
|
"version": "10.0.0",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "choices.js",
|
"name": "choices.js",
|
||||||
"version": "9.1.0",
|
"version": "10.0.0",
|
||||||
"description": "A vanilla JS customisable text input/select box plugin",
|
"description": "A vanilla JS customisable text input/select box plugin",
|
||||||
"main": "./public/assets/scripts/choices.js",
|
"main": "./public/assets/scripts/choices.js",
|
||||||
"types": "./public/types/src/index.d.ts",
|
"types": "./public/types/src/index.d.ts",
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/*! choices.js v9.1.0 | © 2021 Josh Johnson | https://github.com/jshjohnson/Choices#readme */
|
/*! choices.js v10.0.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();
|
||||||
|
@ -1390,7 +1390,7 @@ function () {
|
||||||
};
|
};
|
||||||
|
|
||||||
Choices.prototype._handleSearch = function (value) {
|
Choices.prototype._handleSearch = function (value) {
|
||||||
if (!value || !this.input.isFocussed) {
|
if (!this.input.isFocussed) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1402,7 +1402,7 @@ function () {
|
||||||
return !option.active;
|
return !option.active;
|
||||||
}); // Check that we have a value to search and the input was an alphanumeric character
|
}); // Check that we have a value to search and the input was an alphanumeric character
|
||||||
|
|
||||||
if (value && value.length >= searchFloor) {
|
if (value !== null && typeof value !== 'undefined' && value.length >= searchFloor) {
|
||||||
var resultCount = searchChoices ? this._searchChoices(value) : 0; // Trigger search event
|
var resultCount = searchChoices ? this._searchChoices(value) : 0; // Trigger search event
|
||||||
|
|
||||||
this.passedElement.triggerEvent(constants_1.EVENTS.search, {
|
this.passedElement.triggerEvent(constants_1.EVENTS.search, {
|
||||||
|
|
2
public/assets/scripts/choices.min.js
vendored
2
public/assets/scripts/choices.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,4 +1,4 @@
|
||||||
import IFuseOptions from 'fuse.js';
|
import Fuse from 'fuse.js';
|
||||||
import { Choices } from './choices';
|
import { Choices } from './choices';
|
||||||
import { Choice } from './choice';
|
import { Choice } from './choice';
|
||||||
import { ClassNames } from './class-names';
|
import { ClassNames } from './class-names';
|
||||||
|
@ -410,7 +410,7 @@ export interface Options {
|
||||||
/**
|
/**
|
||||||
* Choices uses the great Fuse library for searching. You can find more options here: https://fusejs.io/api/options.html
|
* Choices uses the great Fuse library for searching. You can find more options here: https://fusejs.io/api/options.html
|
||||||
*/
|
*/
|
||||||
fuseOptions: IFuseOptions<Choices>;
|
fuseOptions: Fuse.IFuseOptions<Choices>;
|
||||||
/**
|
/**
|
||||||
* Function to run once Choices initialises.
|
* Function to run once Choices initialises.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue