File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed
app/code/Magento/Swatches/view/adminhtml/web/js Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -143,6 +143,7 @@ define([
143
143
element . hide ( ) ;
144
144
this . totalItems -- ;
145
145
this . updateItemsCountField ( ) ;
146
+ this . updateSortOrder ( ) ;
146
147
}
147
148
} ,
148
149
@@ -153,6 +154,17 @@ define([
153
154
$ ( 'swatch-visual-option-count-check' ) . value = this . totalItems > 0 ? '1' : '' ;
154
155
} ,
155
156
157
+ /**
158
+ * Update sort order values
159
+ */
160
+ updateSortOrder : function ( ) {
161
+ jQuery ( '[data-role=swatch-visual-options-container] tr:not(.no-display) [data-role=order]' ) . each (
162
+ function ( index , element ) {
163
+ jQuery ( element ) . val ( index + 1 ) ;
164
+ }
165
+ ) ;
166
+ } ,
167
+
156
168
/**
157
169
* Enable delete button for new option
158
170
*
@@ -267,11 +279,7 @@ define([
267
279
* Update component
268
280
*/
269
281
update : function ( ) {
270
- $ ( '[data-role=swatch-visual-options-container] [data-role=order]' ) . each (
271
- function ( index , element ) {
272
- $ ( element ) . val ( index + 1 ) ;
273
- }
274
- ) ;
282
+ swatchVisualOption . updateSortOrder ( ) ;
275
283
}
276
284
} ) ;
277
285
} ) ;
You can’t perform that action at this time.
0 commit comments