Started to work on the possibilty to create new entities directly from the part edit page.

This fixes issue #203.
This commit is contained in:
Jan Böhmer 2023-01-29 20:42:18 +01:00
parent 672d55624f
commit 1654010ea3
8 changed files with 142 additions and 84 deletions

View file

@ -33,10 +33,13 @@ export default class extends Controller {
//Extract empty message from data attribute
this._emptyMessage = this.element.getAttribute("data-empty-message") ?? "";
const allowAdd = this.element.getAttribute("data-allow-add") === "true";
let settings = {
allowEmptyOption: true,
selectOnTab: true,
maxOptions: null,
create: allowAdd,
searchField: [
{field: "text", weight : 2},