Skip to content

Commit 8e36891

Browse files
MAGETWO-58896: Product Fields Auto-Generation does not work as expected
- Fix value update event for custom attributes - Fix behavior when SKU erased and than filled one more time
1 parent 1b1ec3b commit 8e36891

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

app/code/Magento/Catalog/view/adminhtml/web/js/components/import-handler.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ define([
4343
registry.get(this.queryTemplate + placeholder, function (component) {
4444
this.values[placeholder] = component.getPreview();
4545
component.on('value', this.updateValue.bind(this, placeholder, component));
46+
component.valueUpdate = 'keyup';
4647
}.bind(this));
4748
}, this);
4849
},
@@ -100,7 +101,13 @@ define([
100101
userChanges: function () {
101102
this._super();
102103

103-
if (this.value() === '') {
104+
/**
105+
* As userChanges is called before updateValue,
106+
* we forced to get value from component by reference
107+
*/
108+
var actualValue = arguments[1].currentTarget.value;
109+
110+
if (actualValue === '') {
104111
this.allowImport = true;
105112

106113
if (this.autoImportIfEmpty) {

0 commit comments

Comments
 (0)