From 7b566caa7edac076ded346c013c7f2266f948f29 Mon Sep 17 00:00:00 2001 From: Qstick Date: Tue, 24 Jan 2023 23:15:01 -0600 Subject: [PATCH] Fixed: Filter indicator in interactive search Closes #2679 Co-Authored-By: Mark McDowall --- frontend/src/Components/Menu/FilterMenu.js | 2 +- .../src/Components/Menu/PageMenuButton.css | 8 ++++++ .../src/Components/Menu/PageMenuButton.js | 26 ++++++++++++++++--- .../src/Components/Menu/ToolbarMenuButton.js | 13 +++++----- 4 files changed, 38 insertions(+), 11 deletions(-) diff --git a/frontend/src/Components/Menu/FilterMenu.js b/frontend/src/Components/Menu/FilterMenu.js index 18f5b3926..2ed1235ee 100644 --- a/frontend/src/Components/Menu/FilterMenu.js +++ b/frontend/src/Components/Menu/FilterMenu.js @@ -57,9 +57,9 @@ class FilterMenu extends Component { > + { + showIndicator ? + + + : + null + } +
{text}
@@ -31,12 +49,12 @@ function PageMenuButton(props) { PageMenuButton.propTypes = { iconName: PropTypes.object.isRequired, - text: PropTypes.string, - indicator: PropTypes.bool.isRequired + showIndicator: PropTypes.bool.isRequired, + text: PropTypes.string }; PageMenuButton.defaultProps = { - indicator: false + showIndicator: false }; export default PageMenuButton; diff --git a/frontend/src/Components/Menu/ToolbarMenuButton.js b/frontend/src/Components/Menu/ToolbarMenuButton.js index 4bd4d6e33..ba575753a 100644 --- a/frontend/src/Components/Menu/ToolbarMenuButton.js +++ b/frontend/src/Components/Menu/ToolbarMenuButton.js @@ -9,7 +9,7 @@ import styles from './ToolbarMenuButton.css'; function ToolbarMenuButton(props) { const { iconName, - indicator, + showIndicator, text, ...otherProps } = props; @@ -26,7 +26,7 @@ function ToolbarMenuButton(props) { /> { - indicator && + showIndicator ? - + : + null }
@@ -52,12 +53,12 @@ function ToolbarMenuButton(props) { ToolbarMenuButton.propTypes = { iconName: PropTypes.object.isRequired, - text: PropTypes.string, - indicator: PropTypes.bool.isRequired + showIndicator: PropTypes.bool.isRequired, + text: PropTypes.string }; ToolbarMenuButton.defaultProps = { - indicator: false + showIndicator: false }; export default ToolbarMenuButton;