Skip to content

Commit 308d85a

Browse files
authored
Merge pull request #776 from maiieul/remove-styled-input-ref
chore(styled input): remove ref
2 parents 91a62dc + 33412f7 commit 308d85a

File tree

1 file changed

+1
-3
lines changed
  • packages/kit-styled/src/components/input

1 file changed

+1
-3
lines changed

packages/kit-styled/src/components/input/input.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { $, component$, useSignal, type PropsOf } from '@builder.io/qwik';
1+
import { $, component$, type PropsOf } from '@builder.io/qwik';
22
import { cn } from '@qwik-ui/utils';
33

44
type InputProps = PropsOf<'input'> & {
@@ -8,7 +8,6 @@ type InputProps = PropsOf<'input'> & {
88
export const Input = component$<InputProps>(
99
({ name, error, id, ['bind:value']: valueSig, value, onInput$, ...props }) => {
1010
const inputId = id || name;
11-
const inputRef = useSignal<HTMLInputElement>();
1211

1312
return (
1413
<>
@@ -19,7 +18,6 @@ export const Input = component$<InputProps>(
1918
// workaround to support two way data-binding on the Input component (https://github.com/QwikDev/qwik/issues/3926)
2019
value={valueSig ? valueSig.value : value}
2120
onInput$={valueSig ? $((__, el) => (valueSig.value = el.value)) : onInput$}
22-
ref={inputRef}
2321
class={cn(
2422
'flex h-12 w-full rounded-base border border-input bg-background px-3 py-1 text-sm text-foreground shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50',
2523
props.class,

0 commit comments

Comments
 (0)