-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding functionality to filter buttons (#33)
* adding functionality to filter buttons * adding EOF lines * Fixing issue with color filters * resolve issue #34, now you can click on an active filter button and remove the filter * fixing issue where comboEnergy was active and clicking on it wouldn't remove the filter * resolve issue #32, now generic energy cost is displayed correctly * Deleting semicolons, refactoring the filterbox file, adding hooks * refactoring the method to create buttons * added changes so when a filter by same field already exist it will add it as an or into the same filter, also added changes requested by irving * deleting semicolons
- Loading branch information
1 parent
8722c46
commit 5bab290
Showing
9 changed files
with
406 additions
and
318 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.filter-on { | ||
background-color: #ad2323; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import React from 'react' | ||
|
||
import './FilterButton.css' | ||
|
||
const FilterButton = (props) => { | ||
const { id, fieldname, customClass, onClick } = props | ||
return <label | ||
id={id} | ||
className={`${customClass ? 'filter-on' : ''} btn btn-secondary`} | ||
onClick={ () => onClick(id, fieldname) } | ||
>{id}</label> | ||
} | ||
|
||
export default FilterButton |
Oops, something went wrong.