File tree Expand file tree Collapse file tree 4 files changed +8
-35
lines changed
Catalog/Ui/DataProvider/Product/Form/Modifier
Ui/view/base/web/js/form/element Expand file tree Collapse file tree 4 files changed +8
-35
lines changed Original file line number Diff line number Diff line change @@ -523,11 +523,11 @@ private function getPreviousSetAttributes()
523
523
}
524
524
525
525
/**
526
- * Check is product already exists or we trying to create one
526
+ * Check is product already new or we trying to create one
527
527
*
528
528
* @return bool
529
529
*/
530
- private function isProductExists ()
530
+ private function isProductNew ()
531
531
{
532
532
return (bool ) $ this ->locator ->getProduct ()->getId ();
533
533
}
@@ -552,7 +552,7 @@ private function isProductHasValueForAttribute(ProductAttributeInterface $attrib
552
552
*/
553
553
private function isShowDefaultValue (ProductAttributeInterface $ attribute )
554
554
{
555
- if (!$ this ->isProductExists ()) {
555
+ if (!$ this ->isProductNew ()) {
556
556
return true ;
557
557
} elseif ($ attribute ->getIsRequired () && !$ this ->isProductHasValueForAttribute ($ attribute )) {
558
558
return true ;
Original file line number Diff line number Diff line change @@ -167,15 +167,6 @@ protected function _getDefaultBackendModel()
167
167
break ;
168
168
}
169
169
170
- // we should override default behaviour of Magento\Framework\Exception\LocalizedException\AbstractBackend
171
- // but can't do this in abstract model and can't update DB records because of backward compatibility
172
- if ($ this ->getFrontendInput () == 'select '
173
- && !$ this ->getIsRequired ()
174
- && !$ this ->getBackendModel ()
175
- ) {
176
- return \Magento \Eav \Model \Entity \Attribute \Backend \SelectBackend::class;
177
- }
178
-
179
170
return parent ::_getDefaultBackendModel ();
180
171
}
181
172
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -163,6 +163,10 @@ define([
163
163
this . observe ( 'options' )
164
164
. setOptions ( this . options ( ) ) ;
165
165
166
+ if ( _ . isUndefined ( this . value ( ) ) && ! this . default ) {
167
+ this . clear ( ) ;
168
+ }
169
+
166
170
return this ;
167
171
} ,
168
172
@@ -194,7 +198,7 @@ define([
194
198
} ,
195
199
196
200
/**
197
- * Matches specfied value with existing options
201
+ * Matches specified value with existing options
198
202
* or, if value is not specified, returns value of the first option.
199
203
*
200
204
* @returns {* }
You can’t perform that action at this time.
0 commit comments