Version 10.0.0

This commit is contained in:
Matt Triff 2022-01-02 23:38:07 -05:00
parent ce3d1111d8
commit 3d42067bbd
6 changed files with 9 additions and 9 deletions

2
package-lock.json generated
View file

@ -1,6 +1,6 @@
{
"name": "choices.js",
"version": "9.1.0",
"version": "10.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View file

@ -1,6 +1,6 @@
{
"name": "choices.js",
"version": "9.1.0",
"version": "10.0.0",
"description": "A vanilla JS customisable text input/select box plugin",
"main": "./public/assets/scripts/choices.js",
"types": "./public/types/src/index.d.ts",

View file

@ -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) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
@ -1390,7 +1390,7 @@ function () {
};
Choices.prototype._handleSearch = function (value) {
if (!value || !this.input.isFocussed) {
if (!this.input.isFocussed) {
return;
}
@ -1402,7 +1402,7 @@ function () {
return !option.active;
}); // 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
this.passedElement.triggerEvent(constants_1.EVENTS.search, {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,4 +1,4 @@
import IFuseOptions from 'fuse.js';
import Fuse from 'fuse.js';
import { Choices } from './choices';
import { Choice } from './choice';
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
*/
fuseOptions: IFuseOptions<Choices>;
fuseOptions: Fuse.IFuseOptions<Choices>;
/**
* Function to run once Choices initialises.
*