This is documentation for refine 3.xx.xx, which is no longer actively maintained.
default-value-live-preview
Live previews only work with the latest documentation.
import { useSelect, Select } from "@pankod/refine-antd";
interface ICategory {
id: number;
title: string;
}
const PostCreate: React.FC = () => {
const { selectProps } = useSelect<ICategory>({
resource: "categories",
defaultValue: 11,
});
return (
<Select
placeholder="Select a category" style={{ width: 300 }}
{...selectProps}
/>
);
};