@ -10,7 +10,8 @@ import {
size ,
size ,
each ,
each ,
BlankSplitChar ,
BlankSplitChar ,
Selection
Selection ,
PasteLimit ,
} from "@/core" ;
} from "@/core" ;
import { MultiSelectEditor } from "./editor.multiselect" ;
import { MultiSelectEditor } from "./editor.multiselect" ;
import { Searcher } from "@/base" ;
import { Searcher } from "@/base" ;
@ -123,7 +124,7 @@ export class MultiSelectInsertSearcher extends Widget {
const keywords = this . getKeywords ( ) ;
const keywords = this . getKeywords ( ) ;
self . fireEvent (
self . fireEvent (
MultiSelectInsertSearcher . EVENT _SEARCHING ,
MultiSelectInsertSearcher . EVENT _SEARCHING ,
keywords . length > 2000 ? keywords . slice ( 0 , 2000 ) . concat ( [ BlankSplitChar ] ) : keywords . slice ( 0 , 2000 )
keywords . length > PasteLimit ? keywords . slice ( 0 , PasteLimit ) . concat ( [ BlankSplitChar ] ) : keywords . slice ( 0 , PasteLimit )
) ;
) ;
} ) ;
} ) ;
if ( isNotNull ( o . value ) ) {
if ( isNotNull ( o . value ) ) {
@ -150,7 +151,7 @@ export class MultiSelectInsertSearcher extends Widget {
}
}
getKeyword ( ) {
getKeyword ( ) {
let keywords = this . editor . getKeywords ( ) . slice ( 0 , 2000 ) ;
let keywords = this . editor . getKeywords ( ) . slice ( 0 , PasteLimit ) ;
if ( keywords [ keywords . length - 1 ] === BlankSplitChar ) {
if ( keywords [ keywords . length - 1 ] === BlankSplitChar ) {
keywords = keywords . slice ( 0 , keywords . length - 1 ) ;
keywords = keywords . slice ( 0 , keywords . length - 1 ) ;
}
}