Posted 12 November 2018, 8:07 am EST
Combobox is fairly trivial code but here it is in jsx
<ComboBox
id="managerPakFundName"
displayMemberPath="name"
selectedValuePath="uid"
itemsSource={this.state.funds}
isRequired={Boolean(true)}
selectedIndexChanged={this.fundChanged}
/>
componentDidMount = async () => {
this.clickSubmitBtn.current.disabled = true;
const [hfResponse, currencyResponse] = await Promise.all([
fetch('/api/HedgeFund', {
credentials: 'include',
cache: 'no-cache'
}),
fetch('/api/Reference/GetCurrencyList/true', {
credentials: 'include',
cache: 'no-cache'
})]);
if (hfResponse.ok && currencyResponse.ok) {
const funds = await hfResponse.json();
const currencies = await currencyResponse.json();
this.setState({ funds, currencies });
this.clickSubmitBtn.current.disabled = false;
}
}