Skip to content

Commit

Permalink
Fix Admin Customizable Options Dropdown sort_order issue
Browse files Browse the repository at this point in the history
  • Loading branch information
omiroshnichenko committed Feb 20, 2019
1 parent 310648c commit 4e348fd
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@

<!-- ko foreach: { data: $record().elems(), as: 'elem'} -->
<td if="elem.template"
visible="elem.visible"
visible="elem.visible() && elem.formElement !== 'hidden'"
disable="elem.disabled"
css="$parent.setClasses(elem)"
template="elem.template"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -871,6 +871,7 @@ protected function getPositionFieldConfig($sortOrder)
'formElement' => Hidden::NAME,
'dataScope' => static::FIELD_SORT_ORDER_NAME,
'dataType' => Number::NAME,
'visible' => false,
'sortOrder' => $sortOrder,
],
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,7 @@ define([
data = this.createHeaderTemplate(cell.config);
cell.config.labelVisible = false;
_.extend(data, {
defaultLabelVisible: data.visible(),
label: cell.config.label,
name: cell.name,
required: !!cell.config.validation,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ define([
label = _.findWhere(this.parentComponent().labels(), {
name: index
});
label.visible() !== state ? label.visible(state) : false;
label.defaultLabelVisible && label.visible(state);
} else {
elems[curElem].visible(state);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<!-- ko foreach: { data: $record().elems(), as: 'elem'} -->
<td if="elem.template"
css="$parent.setClasses(elem)"
visible="elem.visible"
visible="elem.visible() && elem.formElement !== 'hidden'"
disable="elem.disabled"
template="elem.template"/>
<!-- /ko -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@

<!-- ko foreach: { data: $record().elems(), as: 'elem'} -->
<td if="elem.template"
visible="elem.visible"
visible="elem.visible() && elem.formElement !== 'hidden'"
disable="elem.disabled"
css="$parent.setClasses(elem)"
template="elem.template"
Expand Down

0 comments on commit 4e348fd

Please sign in to comment.