Skip to content

Commit

Permalink
Use tableState from wdk-client
Browse files Browse the repository at this point in the history
  • Loading branch information
dmfalke committed Nov 25, 2024
1 parent aff9a57 commit fd49177
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
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

0 comments on commit fd49177

Please sign in to comment.