Skip to main content
Refine AI
Version: 3.xx.xx

on-search-live-preview

localhost:3000
Live previews only work with the latest documentation.
import { Select, useSelect } from "@pankod/refine-mantine";

interface ICategory {
id: number;
title: string;
}

const ProductCreate: React.FC = () => {
const { selectProps } = useSelect<ICategory>({
resource: "categories",
onSearch: (value) => [
{
field: "title",
operator: "contains",
value,
}
]
});

return (
<Select
label="Category"
placeholder="Select a category"
withinPortal
{...selectProps}
/>
);
};