Skip to content

Commit

Permalink
BENTO-1284: bento local search minor bugs and improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
AjayDoddapaneni committed Sep 8, 2021
1 parent 7ccb0f7 commit 3a6e5a2
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 6 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,6 @@ module.exports = {
"jsx-a11y/click-events-have-key-events":"off",
"react/jsx-props-no-spreading":"off",
"linebreak-style":"off",
"react/jsx-no-bind":"off",
},
};
12 changes: 9 additions & 3 deletions src/components/SideBar/SideBarComponents/clearFilters.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ const clearFilters = ({
disabled={disable}
className={classes.customButton}
classes={{ root: classes.clearAllButtonRoot }}
onClick={() => onClick()}
disableRipple
onClick={() => onClick()}
>
<img
src={resetIcon.src}
Expand All @@ -26,7 +26,7 @@ const clearFilters = ({
alt={resetIcon.alt}
/>
</Button>
<span className={classes.resetText}>{resetText}</span>
<span className={disable ? classes.resetTextDisabled : classes.resetText}>{resetText}</span>

</div>
);
Expand Down Expand Up @@ -58,7 +58,13 @@ const styles = (theme) => ({
resetText: {
marginTop: '0px',
marginLeft: '8px',
color: '#638FB5',
color: '#4b82b2',
fontSize: 14,
},
resetTextDisabled: {
marginTop: '0px',
marginLeft: '8px',
color: '#a9b2b9',
fontSize: 14,
},
});
Expand Down
2 changes: 1 addition & 1 deletion src/components/SideBar/SideBarComponents/searchComponet.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function localSearchCOmponent({ classes }) {
why clear filter on click not working */}
<a onClick={() => resetFilter()}>
<ClearFilters
disable={options.length === 0}
disable={value.length === 0}
onClick={() => {}}
resetText="Clear all search selections"
/>
Expand Down
7 changes: 5 additions & 2 deletions src/components/SideBar/SideBarView.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ const SideBarContent = ({ classes }) => {
const [value, setValue] = React.useState('1');

const handleChange = (event, newValue) => {
setValue(newValue);
clearAllFilters();
if (value !== newValue) {
setValue(newValue);
clearAllFilters();
}
};
const activeFilters = useSelector((state) => (
state.dashboardTab
Expand Down Expand Up @@ -76,6 +78,7 @@ const SideBarContent = ({ classes }) => {
<ClearFilters
disable={activeFiltersCount === 0}
onClick={() => clearAllFilters()}
resetText="Clear all filtered selections"
/>
</div>
<List component="nav" aria-label="filter cases" classes={{ root: classes.listRoot, divider: classes.dividerRoot }}>
Expand Down
1 change: 1 addition & 0 deletions src/pages/dashboardTab/store/dashboardReducer.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable react/destructuring-assignment */
import _ from 'lodash';
import {
customCheckBox,
Expand Down
1 change: 1 addition & 0 deletions src/pages/fileCentricCart/components/body/cartBody.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const CartHeader = ({
isLoading,
}) => {
function onRowSelectionChange(curr, allRowsSelected) {
// eslint-disable-next-line no-sequences
return (curr, allRowsSelected);
}
const columns = getColumns(table, classes).concat(deleteColumn);
Expand Down

0 comments on commit 3a6e5a2

Please sign in to comment.