Is there a way to enable filters to be open (displayed) by default within React Data Grid? Preferably one that allows me to avoid passing in the toolbar={<Toolbar enableFilter />}
prop to <ReactDataGrid />
Reading through the Adazzle component docs it doesn't seem that there's an apparent prop to pass in on the main <ReactDataGrid />
component that displays filters without invoking onToggleFilter()
via the <Toolbar />
component.
The final grid component I'm building will render with filter inputs immediately visible and editable by the user, with no need to 'click-to-clear' or otherwise invoke the documented onClearFilters()
function. This also makes the <Toolbar />
component (and nested <Filter Rows />
button unnecessary.
My current component is...
<ReactDataGrid
onGridSort={this.handleGridSort}
columns={this.state.columns}
rowGetter={this.rowGetter}
rowsCount={this.getSize()}
toolbar={<Toolbar enableFilter />}
onAddFilter={this.handleFilterChange}
onClearFilters={this.onClearFilters}
/>
Ideally the final component would look something like this...
<ReactDataGrid
onGridSort={this.handleGridSort}
columns={this.state.columns}
rowGetter={this.rowGetter}
rowsCount={this.getSize()}}
onAddFilter={this.handleFilterChange}
filtersVisible={true} // Renders with filters visible/active
/>