@FangerZero wrote:
Today I was auto filling a form, and noticed that if I put selected on the option it doesn’t actually show it as selected, but if you click into the select drop down it is selected, and when I click “ok” it displays correctly. Am I doing this correctly? adopting is set to whatever passes through to the component.
function getDogOptions(dogs) { const data = dogs.map((el, index) => { return (<IonSelectOption value={el.id} key={index}>{el.name}</IonSelectOption>); }); return data; } .... <IonSelect placeholder="Select a Dog" name="dog_1" onIonChange={e => updateForm(e, 'dog_1') }> { doggies && getDogOptions(doggies) } </IonSelect>
Posts: 2
Participants: 1