Allow specifying sort criteria on Table viz (#3460)

* Allow to specify sort criteria on table viz

* Better handling of ordering
This commit is contained in:
Maxime Beauchemin
2017-09-13 20:18:47 -07:00
committed by GitHub
parent 49f24d128b
commit 816c517f0f
6 changed files with 54 additions and 22 deletions

View File

@@ -65,10 +65,11 @@ class ControlPanelsContainer extends React.Component {
</Alert>
}
{this.sectionsToRender().map((section) => {
const hasErrors = section.controlSetRows.some(rows => rows.some((s) => {
const errors = ctrls[s].validationErrors;
return errors && (errors.length > 0);
}));
const hasErrors = section.controlSetRows.some(rows => rows.some(s => (
ctrls[s] &&
ctrls[s].validationErrors &&
(ctrls[s].validationErrors.length > 0)
)));
return (
<ControlPanelSection
key={section.label}