diff options
Diffstat (limited to 'gui/src/renderer/components/cell')
| -rw-r--r-- | gui/src/renderer/components/cell/Input.tsx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gui/src/renderer/components/cell/Input.tsx b/gui/src/renderer/components/cell/Input.tsx index 4a11791136..bfa47b6687 100644 --- a/gui/src/renderer/components/cell/Input.tsx +++ b/gui/src/renderer/components/cell/Input.tsx @@ -5,10 +5,13 @@ import { mediumText } from '../common-styles'; import { CellDisabledContext } from './Container'; import StandaloneSwitch from '../Switch'; -export function Switch(props: StandaloneSwitch['props']) { +export const Switch = React.forwardRef(function SwitchT( + props: StandaloneSwitch['props'], + ref: React.Ref<HTMLDivElement>, +) { const disabled = useContext(CellDisabledContext); - return <StandaloneSwitch disabled={disabled} {...props} />; -} + return <StandaloneSwitch forwardedRef={ref} disabled={disabled} {...props} />; +}); export const InputFrame = styled.div({ flexGrow: 0, |
