Skip to content

Commit ede9936

Browse files
author
Fabian Kretzer
committed
incorrect state handling overwrites custom match / filter functions
1 parent 84507d8 commit ede9936

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

test/FilterTests.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,4 +341,18 @@ describe('Grid filter tests', function () {
341341
);
342342
expect(grid.find("th input").at(0).prop("type")).be.equal("checkbox");
343343
});
344+
345+
it('Should use more than one custom filterFunction', ()=>{
346+
let grid = mount(
347+
<Grid objects={[{name: "a", age: 1}, {name: "b", age: 2}]} defaultFilter={[{columnName: "name", expression: "a"}]} >
348+
<Column name="name" >
349+
<Cell content={()=> <div>FOO</div>}/>
350+
<Filter match={() => false}/>
351+
</Column>
352+
<Column name="age" >
353+
<Cell content={()=> <div>BAR</div>}/>
354+
<Filter match={() => false}/>
355+
</Column>
356+
</Grid>);
357+
});
344358
});

0 commit comments

Comments
 (0)