Posted 12 January 2020, 4:17 am EST
Hi, I implemented AutoComplete in FlexGrid using template.
I’m trying to get selectedValue and set it back to React State (or itemsSource).
Should I do it in the initialized of FlexGrid or changehandler?
I’m using Wijmo 5 and React 16. Here is the code:
<wjGrid.FlexGrid itemsSource={this.state.data} initialized={this.flexInitialized.bind(this)} >
<wjGridFilter.FlexGridFilter />
<wjGrid.FlexGridColumn binding="id" header="ID" >
<wjGrid.FlexGridCellTemplate cellType="CellEdit"
template={(context) => {
return <wjInput.AutoComplete
itemsSource={this.state.map}
id="id"
displayMemberPath="label"
//selectedIndexChanged={this.changehandler}
selectedItem={this.state.map.find(o => o.id === context.item.id)}
/>
}} />
</wjGrid.FlexGridColumn>
</wjGrid.FlexGrid>