I have a dropdownlist component and the default value is not being set, only the placeholder is shown. The variable list is a list in this format: list= [{name: 'Taylor Abbott', id: 'tabbott'}, {name: "John Smith", id: 'jsmith'}]. Any idea what could be going wrong here? this whole thing is wrapped inside of a FormProvider component from react-hook-form so I'm wondering if that has something to do with it
const itemTemplate = (reviewer) => {
return (<span>{`${reviewer.id} - ${reviewer.name}`}span>)
}
return (
<div style={{ width: '100%', paddingTop: '1%', paddingBottom: '1%' }}>
<DropDownListComponent
id={'dropdown'}
placeholder={'Please select a reviewer'}
dataSource={list}
fields={{ value: 'id', text: 'name' }}
itemTemplate={itemTemplate}
value={'tabbott'}
enabled={true}
/>
div>
)