Skip to main content
🧙‍♂️ refine grants your wishes! Please give us a ⭐️ on GitHub to keep the magic going.
Version: 4.xx.xx

on-search-live-preview

localhost:3000
import { useSelect } from "@refinedev/mantine";
import { Select } from "@mantine/core";

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}
/>
);
};