Skip to content

Commit

Permalink
Fixup Interactive Search Infinite Loop and Filter CSS
Browse files Browse the repository at this point in the history
  • Loading branch information
Qstick committed Apr 1, 2020
1 parent 43f981b commit dd8db64
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 39 deletions.
4 changes: 4 additions & 0 deletions frontend/src/Artist/Details/ArtistDetails.css
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@
margin-left: 20px;
}

.filterIcon {
float: right;
}

.artistNavigationButtons {
white-space: nowrap;
}
Expand Down
29 changes: 1 addition & 28 deletions frontend/src/InteractiveSearch/InteractiveSearch.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
import PropTypes from 'prop-types';
import React from 'react';
import { align, icons, sortDirections } from 'Helpers/Props';
import { icons, sortDirections } from 'Helpers/Props';
import LoadingIndicator from 'Components/Loading/LoadingIndicator';
import Icon from 'Components/Icon';
import FilterMenu from 'Components/Menu/FilterMenu';
import PageMenuButton from 'Components/Menu/PageMenuButton';
import Table from 'Components/Table/Table';
import TableBody from 'Components/Table/TableBody';
import InteractiveSearchFilterModalConnector from './InteractiveSearchFilterModalConnector';
import InteractiveSearchRow from './InteractiveSearchRow';
import styles from './InteractiveSearch.css';

Expand Down Expand Up @@ -90,36 +87,16 @@ function InteractiveSearch(props) {
error,
totalReleasesCount,
items,
selectedFilterKey,
filters,
customFilters,
sortKey,
sortDirection,
type,
longDateFormat,
timeFormat,
onSortPress,
onFilterSelect,
onGrabPress
} = props;

return (
<div>
{ false &&
<div className={styles.filterMenuContainer}>
<FilterMenu
alignMenu={align.RIGHT}
selectedFilterKey={selectedFilterKey}
filters={filters}
customFilters={customFilters}
buttonComponent={PageMenuButton}
filterModalConnectorComponent={InteractiveSearchFilterModalConnector}
filterModalConnectorComponentProps={{ type }}
onFilterSelect={onFilterSelect}
/>
</div>
}

{
isFetching ? <LoadingIndicator /> : null
}
Expand Down Expand Up @@ -194,16 +171,12 @@ InteractiveSearch.propTypes = {
error: PropTypes.object,
totalReleasesCount: PropTypes.number.isRequired,
items: PropTypes.arrayOf(PropTypes.object).isRequired,
selectedFilterKey: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
filters: PropTypes.arrayOf(PropTypes.object).isRequired,
customFilters: PropTypes.arrayOf(PropTypes.object).isRequired,
sortKey: PropTypes.string,
sortDirection: PropTypes.string,
type: PropTypes.string.isRequired,
longDateFormat: PropTypes.string.isRequired,
timeFormat: PropTypes.string.isRequired,
onSortPress: PropTypes.func.isRequired,
onFilterSelect: PropTypes.func.isRequired,
onGrabPress: PropTypes.func.isRequired
};

Expand Down
10 changes: 0 additions & 10 deletions frontend/src/InteractiveSearch/InteractiveSearchConnector.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,6 @@ class InteractiveSearchConnector extends Component {
}
}

componentDidUpdate(prevProps) {
const {
searchPayload,
dispatchFetchReleases
} = this.props;
if (prevProps.searchPayload !== searchPayload) {
dispatchFetchReleases(searchPayload);
}
}

//
// Render

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/Store/Actions/releaseActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export const defaultState = {
},

artist: {
selectedFilterKey: 'discography-pack'
selectedFilterKey: 'all'
}
};

Expand Down

0 comments on commit dd8db64

Please sign in to comment.