Thank you for reporting this bug. We will make it our priority to review this report.
-
Sencha User
ComboBoxField getRawValue returns previous value
I'm using ExtReact 7.0.0, from the documentation and various posts out there sounded like getRawValue would return the selected displayValue value. However it appears to return the previous value which is unexpected. I' reporting this as a bug because this is not what the documentation states would occur. I'm unable to save a fiddler sample so here is the code:
Code:
import React, { Component } from 'react';
import { launch} from '@sencha/ext-react';
import { ExtReact } from '@sencha/ext-react';
import { Container, Panel, ComboBoxField } from '@sencha/ext-modern';
class App extends Component {
constructor(props) {
super(props);
const data = new Ext.data.Store ({
data: [
{label: '1st value', value: 1},
{label: '2nd value', value: 2}
],
})
this.state = {
storeData: data
}
}
handleOnChange(obj, newValue, oldValue, opts) {
console.log('obj.getRawValue', obj.getRawValue());
}
render() {
return (
<ExtReact>
<Container layout="fit" padding={10} fullscreen>
<Panel title="ExtReact" bodyPadding={10} shadow>
<ComboBoxField
label="Test CB"
displayField="label"
valueField="value"
placeholder="..."
onChange={this.handleOnChange.bind(this)}
store={this.state.storeData}
id="cboTest"
queryMode="local"
forceSelection={true}
/>
</Panel>
</Container>
</ExtReact>
)
}
}
launch(<App />);