79544344

Date: 2025-03-30 08:44:49
Score: 1
Natty:
Report link

As the documentation states, there is no props called icon; there is checkIconPosition and the property is right/left. You are using icon , which may be causing the issue. Please visit this documentation [https://mantine.dev/core/select/?t=props] Please update your code by following code,

  const cityOptions = cities?.map((city) => ({
    value: city.id.toString(),
    label: city.name,
  })) || [];
  
  console.log("cityoptions", cityOptions);
  console.log("isLoading:", isLoading);

  return (
    <Select
      name="city"
      placeholder="Cities"
      value={city}
      maw={200}
      size="md"
      data={cityOptions}
      disabled={isLoading}
      onChange={(value) => setCity(value)}
      leftSection={<IconSelector size={18} stroke={1.75} />}
      clearable
      nothingFound="No cities found"
      style={{ marginBottom: 0 }}
    />
  );
};
Reasons:
  • Blacklisted phrase (1): this document
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (0.5):
Posted by: Ajoy_Sarker