From 848b183ab8369d3811667728d2a06f52b26f0544 Mon Sep 17 00:00:00 2001 From: ta264 Date: Thu, 22 Jul 2021 20:25:02 +0100 Subject: [PATCH] Fixed: Column settings for series table --- .../src/Author/Details/AuthorDetailsSeriesConnector.js | 10 +++++----- frontend/src/Store/Actions/seriesActions.js | 5 +++++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/frontend/src/Author/Details/AuthorDetailsSeriesConnector.js b/frontend/src/Author/Details/AuthorDetailsSeriesConnector.js index 133d17900..9b9c7e421 100644 --- a/frontend/src/Author/Details/AuthorDetailsSeriesConnector.js +++ b/frontend/src/Author/Details/AuthorDetailsSeriesConnector.js @@ -4,9 +4,9 @@ import PropTypes from 'prop-types'; import React, { Component } from 'react'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; -import { setBooksTableOption, toggleBooksMonitored } from 'Store/Actions/bookActions'; +import { toggleBooksMonitored } from 'Store/Actions/bookActions'; import { executeCommand } from 'Store/Actions/commandActions'; -import { setSeriesSort } from 'Store/Actions/seriesActions'; +import { setSeriesSort, setSeriesTableOption } from 'Store/Actions/seriesActions'; import createAuthorSelector from 'Store/Selectors/createAuthorSelector'; import createCommandsSelector from 'Store/Selectors/createCommandsSelector'; import createDimensionsSelector from 'Store/Selectors/createDimensionsSelector'; @@ -70,7 +70,7 @@ function createMapStateToProps() { const mapDispatchToProps = { toggleBooksMonitored, - setBooksTableOption, + setSeriesTableOption, dispatchSetSeriesSort: setSeriesSort, executeCommand }; @@ -81,7 +81,7 @@ class AuthorDetailsSeasonConnector extends Component { // Listeners onTableOptionChange = (payload) => { - this.props.setBooksTableOption(payload); + this.props.setSeriesTableOption(payload); } onSortPress = (sortKey) => { @@ -113,7 +113,7 @@ class AuthorDetailsSeasonConnector extends Component { AuthorDetailsSeasonConnector.propTypes = { authorId: PropTypes.number.isRequired, toggleBooksMonitored: PropTypes.func.isRequired, - setBooksTableOption: PropTypes.func.isRequired, + setSeriesTableOption: PropTypes.func.isRequired, dispatchSetSeriesSort: PropTypes.func.isRequired, executeCommand: PropTypes.func.isRequired }; diff --git a/frontend/src/Store/Actions/seriesActions.js b/frontend/src/Store/Actions/seriesActions.js index 72109218c..bf4f0538f 100644 --- a/frontend/src/Store/Actions/seriesActions.js +++ b/frontend/src/Store/Actions/seriesActions.js @@ -5,6 +5,7 @@ import createFetchHandler from './Creators/createFetchHandler'; import createHandleActions from './Creators/createHandleActions'; import createSetClientSideCollectionSortReducer from './Creators/Reducers/createSetClientSideCollectionSortReducer'; import createSetSettingValueReducer from './Creators/Reducers/createSetSettingValueReducer'; +import createSetTableOptionReducer from './Creators/Reducers/createSetTableOptionReducer'; // // Variables @@ -80,6 +81,7 @@ export const defaultState = { export const FETCH_SERIES = 'series/fetchSeries'; export const SET_SERIES_SORT = 'books/setSeriesSort'; +export const SET_SERIES_TABLE_OPTION = 'books/setSeriesTableOption'; export const CLEAR_SERIES = 'series/clearSeries'; export const SET_SERIES_VALUE = 'books/setBookValue'; @@ -88,6 +90,7 @@ export const SET_SERIES_VALUE = 'books/setBookValue'; export const fetchSeries = createThunk(FETCH_SERIES); export const setSeriesSort = createAction(SET_SERIES_SORT); +export const setSeriesTableOption = createAction(SET_SERIES_TABLE_OPTION); export const clearSeries = createAction(CLEAR_SERIES); // @@ -104,6 +107,8 @@ export const reducers = createHandleActions({ [SET_SERIES_SORT]: createSetClientSideCollectionSortReducer(section), + [SET_SERIES_TABLE_OPTION]: createSetTableOptionReducer(section), + [SET_SERIES_VALUE]: createSetSettingValueReducer(section), [CLEAR_SERIES]: (state) => {