We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6bd5229 commit 6e048daCopy full SHA for 6e048da
src/tom-select.ts
@@ -1362,7 +1362,12 @@ export default class TomSelect extends MicroPlugin(MicroEvent){
1362
// perform search
1363
if (query !== self.lastQuery) {
1364
self.lastQuery = query;
1365
- result = self.sifter.search(query, Object.assign(options, {score: calculateScore}));
+ // temp fix for https://github.com/orchidjs/tom-select/issues/987
1366
+ // UI crashed when more than 30 same chars in a row, prevent search and return empt result
1367
+ if (/(.)\1{15,}/.test(query)) {
1368
+ query = '';
1369
+ }
1370
+ result = self.sifter.search(query, Object.assign(options, { score: calculateScore }));
1371
self.currentResults = result;
1372
} else {
1373
result = Object.assign( {}, self.currentResults);
0 commit comments