I am trying to replace filter components input field with text field from materialUI text field. I am able to display input field by creating a new component, but its not filtering contents.
I don't want different filter function just wanted to replace input field with material UI text field
Current Griddle section is
import Pagination from '/imports/ui/components/admin/common/pagination-new'; import Filteration from '/imports/ui/components/admin/common/filteration-new';
<Griddle
ref={(ref) => {this._griddle = ref}}
useGriddleStyles={false}
columnMetadata={columnMeta}
results={this.getGriddleData()}
resultsPerPage={5}
tableClassName='table'
showFilter={true}
settingsText={''}
showSettings={true}
settingsToggleClassName={'text-hide'}
settingsIconComponent={
<RaisedButton
label='Columns'
primary={true}
/>}
useCustomPagerComponent={true}
customPagerComponent={Pagination}
useCustomFilterComponent={true}
customFilterComponent={Filteration}
columns={[
'actions','name', 'published', 'whiteboard.exist',
'location.floor', 'capacity.number',
'av.tv','av.appleTv','av.videocon',]}/>
Filteration Component
render() {
return (
<div style={{display: 'flex'}}>
<TextField
name='title'
floatingLabelText='title'
/>
</div>
)
},
Yes, this can be done. The component you supply to
customFilterComponent
will receive the following props from Griddle:changeFilter
,results
,currentResults
,placeholderText
. You can then reference these inside that component, and pass them onto the material-ui TextField: