@@ -243,7 +285,7 @@ export default class BGroupBuildingTable extends Component {
value={filter ? filter.value : 'all'}
>
-
+
),
@@ -348,7 +390,8 @@ export default class BGroupBuildingTable extends Component {
columns: [
{
Header: 'Recommended Retrofits',
- filterMethod: listFilterMethod,
+ filterMethod: impactRecommendedFilterMethod,
+ Filter: impactRecommendedFilter,
accessor: 'recommended_retrofits',
Cell: (row) => {
if (row.value && row.value.length > 0) {
@@ -390,7 +433,8 @@ export default class BGroupBuildingTable extends Component {
},
}, {
Header: 'Deemed Savings (recommended)',
- filterable: false,
+ filterMethod: impactRecommendedFilterMethod,
+ Filter: impactRecommendedFilter,
style: { textAlign: 'center' },
accessor: 'projected_deemed_savings',
Cell: (row) => {
@@ -433,16 +477,8 @@ export default class BGroupBuildingTable extends Component {
},
}, {
Header: 'Completed Retrofits',
- filterMethod: (filter, row) => {
- if (row[filter.id]) {
- return row[filter.id].reduce((acc, val) => (
- val && (acc || val.completed.toLowerCase().indexOf(
- filter.value.toLowerCase()
- ) !== -1)
- ), false);
- }
- return false;
- },
+ filterMethod: impactCompletedFilterMethod,
+ Filter: impactCompletedFilter,
accessor: 'completed_retrofits',
Cell: row => (row.value ? (
@@ -455,7 +491,8 @@ export default class BGroupBuildingTable extends Component {
) : null),
}, {
Header: 'Deemed Savings (completed)',
- filterable: false,
+ filterMethod: impactCompletedFilterMethod,
+ Filter: impactCompletedFilter,
style: { textAlign: 'center' },
accessor: 'completed_deemed_savings',
Cell: (row) => {