Skip to content

Commit

Permalink
🪟 🐛 Fix broken switch UI state - when checked state provided as a "va…
Browse files Browse the repository at this point in the history
…lue" (#21219)

* fix broken switch state - when checked state provided as a "value"

* Update airbyte-webapp/src/components/ui/Switch/Switch.tsx

Co-authored-by: Krishna (kc) Glick <krishna@airbyte.io>

Co-authored-by: Krishna (kc) Glick <krishna@airbyte.io>
  • Loading branch information
dizel852 and krishnaglick authored Jan 11, 2023
1 parent 8dffde0 commit f3a70be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion airbyte-webapp/src/components/ui/Switch/Switch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const Switch: React.FC<SwitchProps> = ({
<label className={labelStyle}>
<input
{...props}
aria-checked={indeterminate ? "mixed" : checked}
aria-checked={(indeterminate ? "mixed" : checked) ?? !!value}
className={styles.switchInput}
type="checkbox"
value={value}
Expand Down

0 comments on commit f3a70be

Please sign in to comment.