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

Use tableState from wdk-client #1286

Merged
merged 2 commits into from
Nov 25, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { cloneElement, Component } from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import { get } from 'lodash';
import { updateTableState } from '../../actioncreators/RecordViewActionCreators';
import { updateTableState } from '@veupathdb/wdk-client/lib/Actions/RecordActions';

/**
* Tables that are fully collapsed on load.
Expand Down Expand Up @@ -126,7 +126,7 @@ RecordTableContainer.propTypes = {

const enhance = connect(
({ record: state }, props) => ({
tableState: get(state, 'eupathdb.tables.' + props.table.name),
tableState: get(state, 'tableStates.' + props.table.name),
}),
{ updateTableState }
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import {
isNodeOverflowing,
} from '@veupathdb/web-common/lib/util/domUtils';

import { updateTableState } from '../../actioncreators/RecordViewActionCreators';
import { projectId, webAppUrl } from '../../config';
import * as Gbrowse from '../common/Gbrowse';
import { OverviewThumbnails } from '../common/OverviewThumbnails';
Expand Down Expand Up @@ -1552,11 +1551,11 @@ class OrthologsForm extends SortKeyTable {

const TranscriptionSummaryForm = connect(
({ record }) => ({
expressionGraphsTableState: record.eupathdb.tables?.ExpressionGraphs,
expressionGraphsTableState: record.tableStates?.ExpressionGraphs,
}),
{
updateSectionVisibility: RecordActions.updateSectionVisibility,
updateTableState,
updateTableState: RecordActions.updateTableState,
}
)(
class TranscriptionSummaryFormPres extends SortKeyTable {
Expand Down Expand Up @@ -1643,10 +1642,7 @@ const TranscriptionSummaryForm = connect(
this.props.updateTableState('ExpressionGraphs', {
...this.props.expressionGraphsTableState,
searchTerm: '',
selectedRow: {
index: expressionGraphIndex,
id: `ExpressionGraphs__${ExpressionGraphs[expressionGraphIndex].dataset_id}`,
},
selectedRow: expressionGraphIndex,
});
}
);
Expand Down
Loading