Skip to content

Commit a8ef928

Browse files
chore(dropdown): updates naming convetion
1 parent a61f5eb commit a8ef928

File tree

3 files changed

+5
-12
lines changed

3 files changed

+5
-12
lines changed

packages/kit-headless/src/components/dropdown/dropdown-checkbox-item.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ type DropdownCheckboxItemProps = {
99
* QRL handler that runs when the user selects an item.
1010
*/
1111
onChange$?: QRL<(checked: boolean) => void>;
12-
} & DropdownItemProps;
12+
} & Omit<DropdownItemProps, 'onChange$'>;
1313

1414
export const HDropdownCheckboxItem = component$((props: DropdownCheckboxItemProps) => {
1515
const { disabled = false, closeOnSelect = false, onChange$, ...rest } = props;
1616

1717
const checkedSig = useSignal<boolean>(false);
1818

19-
useTask$(function reactiveUserOpen({ track }) {
19+
useTask$(function reactiveUserChecked({ track }) {
2020
const bindCheckedSig = props['bind:checked'];
2121
if (!bindCheckedSig) return;
2222
track(() => bindCheckedSig.value);

packages/kit-headless/src/components/dropdown/dropdown-inline.tsx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,6 @@ export const HDropdownRoot: Component<DropdownProps & InlineCompProps> = (
7070

7171
// increment after processing children
7272
currItemIndex++;
73-
74-
// the default case isn't handled here, so we need to process the children to get to the label component
75-
if (child.props.children) {
76-
const childChildren = Array.isArray(child.props.children)
77-
? [...child.props.children]
78-
: [child.props.children];
79-
childrenToProcess.unshift(...childChildren);
80-
}
81-
8273
break;
8374
}
8475

packages/kit-headless/src/components/dropdown/dropdown-radio-group.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ type DropdownRadioGroupProps = {
2727
* QRL handler that runs when the user selects an item.
2828
*/
2929
onChange$?: QRL<(value: string) => void>;
30-
} & PropsOf<'div'>;
30+
} & Omit<PropsOf<'div'>, 'onChange$'>;
3131

3232
export const HDropdownRadioGroup = component$((props: DropdownRadioGroupProps) => {
3333
const { disabled = false, defaultValue = '', onChange$, ...rest } = props;
@@ -39,6 +39,8 @@ export const HDropdownRadioGroup = component$((props: DropdownRadioGroupProps) =
3939
if (!bindValueSig) return;
4040
track(() => bindValueSig.value);
4141

42+
console.log('bindValueSig.value:', bindValueSig.value);
43+
4244
valueSig.value = bindValueSig.value;
4345
});
4446

0 commit comments

Comments
 (0)