remove text from tag choice after selection - fixes #4076

This commit is contained in:
Kevin Papst
2023-08-04 13:03:11 +02:00
parent b831532323
commit 0a0ffb4ac9
7 changed files with 15 additions and 5 deletions

View File

@@ -41,6 +41,11 @@ export default class KimaiAutocomplete extends KimaiFormPlugin {
} }
new TomSelect(node, { new TomSelect(node, {
// see https://github.com/orchidjs/tom-select/issues/543#issuecomment-1664342257
onItemAdd: function(){
// remove remaining characters from input after selecting an item
this.setTextboxValue('');
},
// if there are more than 500, they need to be found by "typing" // if there are more than 500, they need to be found by "typing"
maxOptions: 500, maxOptions: 500,
// the autocomplete is ONLY used, when the user can create tags // the autocomplete is ONLY used, when the user can create tags

View File

@@ -71,6 +71,11 @@ export default class KimaiFormSelect extends KimaiFormPlugin {
*/ */
let options = { let options = {
// see https://github.com/orchidjs/tom-select/issues/543#issuecomment-1664342257
onItemAdd: function(){
// remove remaining characters from input after selecting an item
this.setTextboxValue('');
},
lockOptgroupOrder: true, lockOptgroupOrder: true,
allowEmptyOption: !isRequired, allowEmptyOption: !isRequired,
hidePlaceholder: false, hidePlaceholder: false,

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -3,7 +3,7 @@
"app": { "app": {
"js": [ "js": [
"/build/runtime.f0079159.js", "/build/runtime.f0079159.js",
"/build/app.99c7b6b4.js" "/build/app.9acfcfc8.js"
], ],
"css": [ "css": [
"/build/app.eb575c90.css" "/build/app.eb575c90.css"
@@ -63,7 +63,7 @@
}, },
"integrity": { "integrity": {
"/build/runtime.f0079159.js": "sha384-H22sAW1aTvyIPqvHOvGXWSWTxf0y6mptp+MsVmyXCfjx/WJjBbhX9gbUZ+qIuihV", "/build/runtime.f0079159.js": "sha384-H22sAW1aTvyIPqvHOvGXWSWTxf0y6mptp+MsVmyXCfjx/WJjBbhX9gbUZ+qIuihV",
"/build/app.99c7b6b4.js": "sha384-bPAdOMl3I6Ia3clnHgDiwoNKKe/bKnAdHUJdl7BXbsFNMg2wHsUDrGH+uNCQowqM", "/build/app.9acfcfc8.js": "sha384-tzbF0uEmHghIo+D5IuKarLYkwB3AyrLMTEFqR5mqaXCP5VSOWx3t+ZfD81kd80T+",
"/build/app.eb575c90.css": "sha384-CT92SMS+AjbulH+hT+pOq4jicscpVYpl/acq388EdqruZe26icGl9sNq9xaYXH8l", "/build/app.eb575c90.css": "sha384-CT92SMS+AjbulH+hT+pOq4jicscpVYpl/acq388EdqruZe26icGl9sNq9xaYXH8l",
"/build/export-pdf.d367a32e.js": "sha384-Z5baqnzjI636nYFs4g63ViIKBZKRW4Jhv/7PQmTEQlqhfA7eK0vUMUtiyy0R5A9u", "/build/export-pdf.d367a32e.js": "sha384-Z5baqnzjI636nYFs4g63ViIKBZKRW4Jhv/7PQmTEQlqhfA7eK0vUMUtiyy0R5A9u",
"/build/export-pdf.d8a6c23b.css": "sha384-ztepocHE4rnGE9eKZ4kL6jTKaePUyiwiB9TjJjstjpf/ckcKg1HedrEOOk/8ElJg", "/build/export-pdf.d8a6c23b.css": "sha384-ztepocHE4rnGE9eKZ4kL6jTKaePUyiwiB9TjJjstjpf/ckcKg1HedrEOOk/8ElJg",

View File

@@ -1,6 +1,6 @@
{ {
"build/app.css": "/build/app.eb575c90.css", "build/app.css": "/build/app.eb575c90.css",
"build/app.js": "/build/app.99c7b6b4.js", "build/app.js": "/build/app.9acfcfc8.js",
"build/export-pdf.css": "/build/export-pdf.d8a6c23b.css", "build/export-pdf.css": "/build/export-pdf.d8a6c23b.css",
"build/export-pdf.js": "/build/export-pdf.d367a32e.js", "build/export-pdf.js": "/build/export-pdf.d367a32e.js",
"build/invoice.css": "/build/invoice.5bea118e.css", "build/invoice.css": "/build/invoice.5bea118e.css",