mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-27 12:18:54 +02:00
Fixed multi-part action selectors.
This commit is contained in:
parent
b8da4c62d0
commit
7ff1584eb9
8 changed files with 266 additions and 190 deletions
|
@ -29,7 +29,10 @@ export default class extends Controller {
|
|||
_emptyMessage;
|
||||
|
||||
connect() {
|
||||
this._init();
|
||||
}
|
||||
|
||||
_init() {
|
||||
this._emptyMessage = this.element.getAttribute("data-empty-message") ?? "";
|
||||
if (this._emptyMessage === "" && this.element.hasAttribute('title')) {
|
||||
this._emptyMessage = this.element.getAttribute('title');
|
||||
|
@ -50,6 +53,10 @@ export default class extends Controller {
|
|||
this._tomSelect = new TomSelect(this.element, settings);
|
||||
}
|
||||
|
||||
getTomSelect() {
|
||||
return this._tomSelect;
|
||||
}
|
||||
|
||||
renderItem(data, escape) {
|
||||
//The empty option is rendered muted
|
||||
if (data.value === "") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue