Skip to content

Commit

Permalink
Fix sorting in antd dataset table (#4318)
Browse files Browse the repository at this point in the history
* fix sorting in antd dataset table
* update changelog
  • Loading branch information
philippotto authored and bulldozer-boy[bot] committed Nov 13, 2019
1 parent b2cb1ca commit 6fe5902
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.md).
-

### Fixed
-
- Fixed broken sorting in the dataset table of the dashboard. [#4318](https://github.com/scalableminds/webknossos/pull/4318)

### Removed
-
Expand All @@ -30,7 +30,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.md).

### Fixed
- Cleaned up error reporting wording in case of dataset access failures (e.g. due to not being logged in). [#4301](https://github.com/scalableminds/webknossos/pull/4301)
- Fixed handling of uint64 data layers in sql evolution. [4303](https://github.com/scalableminds/webknossos/pull/4303)
- Fixed handling of uint64 data layers in sql evolution. [#4303](https://github.com/scalableminds/webknossos/pull/4303)


## [19.10.0](https://github.com/scalableminds/webknossos/releases/tag/19.10.0) - 2019-09-30
Expand Down
8 changes: 6 additions & 2 deletions frontend/javascripts/components/fixed_expandable_table.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Table } from "antd";
import * as React from "react";

type Props = {
children: React.Node,
children: Array<React.Element<typeof Table.Column>>,
expandedRowRender: Function,
};

Expand All @@ -26,7 +26,11 @@ export default class FixedExpandableTable extends React.PureComponent<Props, Sta
render() {
const { expandedColumns } = this.state;
const { children, ...restProps } = this.props;
const columnsWithAdjustedFixedProp = React.Children.map(children, child => {

// Don't use React.Children.map here, since this adds .$ prefixes
// to the keys. However, the keys are needed when managing the sorters
// of the table.
const columnsWithAdjustedFixedProp = children.map(child => {
const columnFixed = expandedColumns.length > 0 ? false : child.props.fixed;
return React.cloneElement(child, { fixed: columnFixed });
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ class TracingActionsView extends React.PureComponent<Props, State> {
key="sandbox-tooltip"
>
<Button disabled type="primary" icon="code-sandbox">
Sandbox
<span className="hide-on-small-screen">Sandbox</span>
</Button>
</Tooltip>
),
Expand Down

0 comments on commit 6fe5902

Please sign in to comment.