File tree Expand file tree Collapse file tree 3 files changed +1
-12
lines changed
apps/website/src/routes/docs/headless/(components)/combobox
packages/kit-headless/src/components/combobox Expand file tree Collapse file tree 3 files changed +1
-12
lines changed Original file line number Diff line number Diff line change @@ -1173,7 +1173,6 @@ export const ContextChild = component$(() => {
1173
1173
export const SearchBar = component$ ( ( ) => {
1174
1174
const inputValueSig = useSignal ( '' ) ;
1175
1175
const highlightedIndexSig = useSignal ( 0 ) ;
1176
- const inputRef = useSignal < HTMLInputElement > ( ) ;
1177
1176
const isListboxOpenSig = useSignal ( false ) ;
1178
1177
1179
1178
type MyComponents = {
@@ -1199,7 +1198,6 @@ export const SearchBar = component$(() => {
1199
1198
< div >
1200
1199
< Combobox
1201
1200
bind :inputValueSig = { inputValueSig }
1202
- bind :inputRef = { inputRef }
1203
1201
bind :highlightedIndexSig = { highlightedIndexSig }
1204
1202
bind :isListboxOpenSig = { isListboxOpenSig }
1205
1203
optionValueKey = "component"
@@ -1228,7 +1226,6 @@ export const SearchBar = component$(() => {
1228
1226
aria-label = "clear search"
1229
1227
onMouseDown$ = { ( ) => {
1230
1228
inputValueSig . value = '' ;
1231
- inputRef . value ?. focus ( ) ;
1232
1229
} }
1233
1230
class = "w-6 h-6 flex justify-center items-center absolute top-0 right-0"
1234
1231
>
Original file line number Diff line number Diff line change @@ -1103,11 +1103,6 @@ This involves creating a signal and passing it in using the [bind syntax](https:
1103
1103
type: 'Signal',
1104
1104
description: 'Controls the current value of the input.',
1105
1105
},
1106
- {
1107
- name: 'bind:inputRef',
1108
- type: 'Signal',
1109
- description: 'Controls the reference of the input.',
1110
- },
1111
1106
]}
1112
1107
/>
1113
1108
Original file line number Diff line number Diff line change @@ -48,7 +48,6 @@ export type ComboboxProps<O extends Option = Option> = {
48
48
'bind:isInputFocusedSig' ?: Signal < boolean | undefined > ;
49
49
'bind:inputValueSig' ?: Signal < string > ;
50
50
'bind:highlightedIndexSig' ?: Signal < number > ;
51
- 'bind:inputRef' ?: Signal < HTMLInputElement | undefined > ;
52
51
} & QwikIntrinsicElements [ 'div' ] ;
53
52
54
53
export const Combobox = component$ (
@@ -58,7 +57,6 @@ export const Combobox = component$(
58
57
'bind:isInputFocusedSig' : givenInputFocusedSig ,
59
58
'bind:inputValueSig' : givenInputValueSig ,
60
59
'bind:highlightedIndexSig' : givenHighlightedIndexSig ,
61
- 'bind:inputRef' : givenInputRef ,
62
60
options,
63
61
defaultLabel = '' ,
64
62
optionValueKey = 'value' ,
@@ -127,8 +125,7 @@ export const Combobox = component$(
127
125
128
126
const labelRef = useSignal < HTMLLabelElement > ( ) ;
129
127
const listboxRef = useSignal < HTMLUListElement > ( ) ;
130
- const defaultInputRef = useSignal < HTMLInputElement > ( ) ;
131
- const inputRef = givenInputRef || defaultInputRef ;
128
+ const inputRef = useSignal < HTMLInputElement > ( ) ;
132
129
133
130
const triggerRef = useSignal < HTMLButtonElement > ( ) ;
134
131
You can’t perform that action at this time.
0 commit comments