I’m using IonSelect
inside an IonGrid
. The displayed options text is shorter that it has to be. It is especially short when a Label is provided.
Here are the images:
The code:
import * as React from "react";
import { render } from "react-dom";
// core css for ionic to work properly
import "@ionic/react/css/core.css";
import {
IonSelect,
IonItem,
IonSelectOption,
IonGrid,
IonRow,
IonCol,
IonLabel
} from "@ionic/react";
function App() {
const [value, setValue] = React.useState("");
const options = ["short", "loooooooooong", "veeeeeeeeeery loooooooooong"];
return (
<IonGrid>
<IonRow>
<IonCol size="6">
<IonItem>
<IonLabel>Label</IonLabel>
<IonSelect
interface="popover"
placeholder="Select one"
value={value}
onIonChange={e => setValue(e.detail.value)}
>
{options.map((option, i) => (
<IonSelectOption value={option} key={i}>
{option}
</IonSelectOption>
))}
</IonSelect>
</IonItem>
</IonCol>
</IonRow>
</IonGrid>
);
}
const rootElement = document.getElementById("root");
render(<App />, rootElement);
Any suggestions?
Thanks