Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix sorting in antd dataset table #4318

Merged
merged 2 commits into from
Nov 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

</Button>
</Tooltip>
),
Expand Down