(null);
return (
{
onChangeAction(o);
setValue(o.target.value);
}}
>
{
onChangeAction(o);
setValue(o.target.value);
}}
>
{
onChangeAction(o);
setValue(o.target.value);
}}
>
{
onChangeAction(o);
setValue(o.target.value);
}}
>
{
onChangeAction(o);
setValue(o.target.value);
}}
>
);
};
export const NotRequired = () => {
const [value, setValue] = useState(null);
return (
{
onChangeAction(o);
setValue(o.target.value);
}}
>
);
};
export const Searchable = () => {
const [value, setValue] = useState(null);
return (
{
onChangeAction(o);
setValue(o.target.value);
}}
>
);
};
function isDepartment(
department: number | string | null | readonly string[],
): department is "38" | "73" | "74" {
return department !== null && ["38", "73", "74"].indexOf(department.toString()) !== -1;
}
export const Dynamic = () => {
const [town, setTown] = useState(null);
const [department, setDepartment] = useState(null);
return (
<>
{
onChangeAction(o);
setDepartment(o.target.value);
setTown(null);
}}
>
{isDepartment(department) && (
{
onChangeAction(o);
setTown(o.target.value);
}}
>
)}
>
);
};
const stars: StarOption[] = [
{ value: 0, label: "Empty", icon: "fe-star-empty" },
{ value: 1, label: "Half", icon: "fe-star-half" },
{ value: 2, label: "Fill", icon: "fe-star" },
];
// @ts-ignore
export const CustomRenderer = ({ disabled, searchable, showArrow }) => {
const [value, setValue] = useState(1);
return (
<>
{
onChangeAction(o);
setValue(o.target.value);
}}
selectSelectionComponent={SelectSelectionComponent}
selectOptionComponent={SelectOptionComponent}
>
>
);
};
CustomRenderer.args = {
disabled: false,
searchable: false,
showArrow: false,
};