Hi,
I am experiencing a bug when using the react library with the iOS theme, Select and labelStyle of floating. Please see the code below and two screenshots. On first render when a default item is specified, the label overlaps the item. If I select the item again or change the item then it renders correctly.
Any workarounds or am I doing something incorrectly? Tested on Firefox and Chrome using V4.7.2. Thanks!
import React, {useState} from 'react';
import mobiscroll from "@mobiscroll/react";
import "@mobiscroll/react/dist/css/mobiscroll.min.css";
mobiscroll.settings = {
theme: 'ios',
};
const locationList = [
{
value: 1,
text: 'Rosebank, Johannesburg',
},
{
value: 2,
text: 'Sandton, Johannesburg',
}
];
const Bug = () => {
const [selectedLocation, setSelectedLocation] = useState(null);
return (
<mobiscroll.Form labelStyle="floating">
<mobiscroll.FormGroup>
<label>
Location
<mobiscroll.Select
data={locationList}
value={selectedLocation}
onSet={(event, inst) => setSelectedLocation(inst.getVal())}
/>
</label>
</mobiscroll.FormGroup>
</mobiscroll.Form>
)
};
export default Bug;