Skip to content

Scheduling infrastructure for absolutely everyone.

fix: background colour for disabled select option (#9320)

Ujwal Kumarfd9cd1b98b9f
diff --git a/apps/web/components/ui/form/CheckedSelect.tsx b/apps/web/components/ui/form/CheckedSelect.tsx
index 1297ce2ed03..53b00e77d3f 100644
--- a/apps/web/components/ui/form/CheckedSelect.tsx
+++ b/apps/web/components/ui/form/CheckedSelect.tsx
@@ -26,12 +26,6 @@ export const CheckedSelect = ({
return (
<>
<Select
- styles={{
- option: (styles, { isDisabled }) => ({
- ...styles,
- backgroundColor: isDisabled ? "#F5F5F5" : "inherit",
- }),
- }}
name={props.name}
placeholder={props.placeholder || t("select")}
isSearchable={false}
diff --git a/packages/features/eventtypes/components/CheckedTeamSelect.tsx b/packages/features/eventtypes/components/CheckedTeamSelect.tsx
index 5d9f1f217c1..80bab7eb387 100644
--- a/packages/features/eventtypes/components/CheckedTeamSelect.tsx
+++ b/packages/features/eventtypes/components/CheckedTeamSelect.tsx
@@ -28,12 +28,6 @@ export const CheckedTeamSelect = ({
return (
<>
<Select
- styles={{
- option: (styles, { isDisabled }) => ({
- ...styles,
- backgroundColor: isDisabled ? "#F5F5F5" : "inherit",
- }),
- }}
name={props.name}
placeholder={props.placeholder || t("select")}
isSearchable={true}
diff --git a/packages/features/eventtypes/components/CheckedUserSelect.tsx b/packages/features/eventtypes/components/CheckedUserSelect.tsx
index d1c188f003d..6780d6744e2 100644
--- a/packages/features/eventtypes/components/CheckedUserSelect.tsx
+++ b/packages/features/eventtypes/components/CheckedUserSelect.tsx
@@ -27,12 +27,6 @@ export const CheckedUserSelect = ({
return (
<>
<Select
- styles={{
- option: (styles, { isDisabled }) => ({
- ...styles,
- backgroundColor: isDisabled ? "#F5F5F5" : "inherit",
- }),
- }}
name={props.name}
placeholder={props.placeholder || t("select")}
isSearchable={false}
diff --git a/packages/features/eventtypes/components/ChildrenEventTypeSelect.tsx b/packages/features/eventtypes/components/ChildrenEventTypeSelect.tsx
index 403a6bc9259..a7813d427e1 100644
--- a/packages/features/eventtypes/components/ChildrenEventTypeSelect.tsx
+++ b/packages/features/eventtypes/components/ChildrenEventTypeSelect.tsx
@@ -40,12 +40,6 @@ export const ChildrenEventTypeSelect = ({
return (
<>
<Select
- styles={{
- option: (styles, { isDisabled }) => ({
- ...styles,
- backgroundColor: isDisabled ? "#F5F5F5" : "inherit",
- }),
- }}
name={props.name}
placeholder={t("select")}
options={options}
diff --git a/packages/ui/components/form/select/Select.tsx b/packages/ui/components/form/select/Select.tsx
index c5adf378e3d..e854f0cc9b0 100644
--- a/packages/ui/components/form/select/Select.tsx
+++ b/packages/ui/components/form/select/Select.tsx
@@ -44,6 +44,7 @@ export const Select = <
cx(
"bg-default flex cursor-pointer justify-between py-2.5 px-3 rounded-none text-default ",
state.isFocused && "bg-subtle",
+ state.isDisabled && "bg-muted",
state.isSelected && "bg-emphasis text-default",
props.classNames?.option
),