autoFit
Description
Optional. Defines whether a dropdown automatically fits to the width of the inputUsage
autoFit?: boolean;
Parameters
- true - a dropdown automatically fits to the width of the input
- false - (default) a dropdown does not automatically fit to the width of the input
Example
import { useState } from "react";
import { Dropdown, Calendar, Text } from "@svar-ui/react-core";
function Example() {
const [popup, setPopup] = useState(false);
return (
<>
{popup && (
<Dropdown autoFit={false}>
<Calendar value={new Date(2023, 2, 15)} />
</Dropdown>
)}
</>
);
}
Related article: Positioning and aligning Dropdown