Skip to content

Commit

Permalink
fix issue with freetext values not loading into list editor on startup
Browse files Browse the repository at this point in the history
  • Loading branch information
olifolkerd committed Jun 4, 2022
1 parent 8baeca1 commit 6f9bb22
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
8 changes: 8 additions & 0 deletions dist/js/tabulator_esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -6103,6 +6103,12 @@ class Edit{

this._parseListItem(value, data, 0);
});

if(!this.currentItems.length && this.params.freetext){
this.input.value = this.initialValues;
this.typing = true;
this.lastAction = "typing";
}

this.data = data;

Expand Down Expand Up @@ -6446,6 +6452,8 @@ class Edit{
}else {
this.currentItems = [item];
item.selected = true;

console.log("choose");

this.input.value = item.label;

Expand Down
2 changes: 1 addition & 1 deletion dist/js/tabulator_esm.js.map

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions src/js/modules/Edit/List.js
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,12 @@ export default class Edit{

this._parseListItem(value, data, 0);
});

if(!this.currentItems.length && this.params.freetext){
this.input.value = this.initialValues;
this.typing = true;
this.lastAction = "typing";
}

this.data = data;

Expand Down Expand Up @@ -946,6 +952,8 @@ export default class Edit{
}else{
this.currentItems = [item];
item.selected = true;

console.log("choose")

this.input.value = item.label;

Expand Down

0 comments on commit 6f9bb22

Please sign in to comment.