Skip to content

Commit

Permalink
[Improvement] Feature/input quantity value cell editor (#520)
Browse files Browse the repository at this point in the history
* Add logic to allow editing in grid for input quantity values.

* Use let.

---------

Co-authored-by: luke.macausland <luke.macausland@torqit.ca>
  • Loading branch information
torqdev and lukemacausland authored May 3, 2024
1 parent 31ca90f commit cc03a3a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions public/js/pimcore/object/tags/inputQuantityValue.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ pimcore.object.tags.inputQuantityValue = Class.create(pimcore.object.tags.abstra
}.bind(this, field.key);

return {
getEditor: this.getWindowCellEditor.bind(this, field),
text: t(field.label),
sortable:true,
dataIndex:field.key,
Expand All @@ -159,6 +160,12 @@ pimcore.object.tags.inputQuantityValue = Class.create(pimcore.object.tags.abstra
};
},

getCellEditValue: function () {
let value = this.getValue();
value["unitAbbr"] = this.unitField.getRawValue();
return value;
},

getName: function () {
return this.fieldConfig.name;
}
Expand Down

0 comments on commit cc03a3a

Please sign in to comment.