Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V2 next #1056

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

V2 next #1056

Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: select
  • Loading branch information
thejackshelton committed Mar 10, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit c4e337b58ebe9e39b1f78312a485e181e0e81807
Original file line number Diff line number Diff line change
@@ -103,7 +103,9 @@ export const HSelectRoot: Component<SelectProps & InlineCompProps> = (
valuePropIndex = currItemIndex;
}

const isString = typeof child.props.children === 'string';
const isString =
typeof child.props.children === 'string' ||
typeof child.props.children === 'object';

if (!isString) {
throw new Error(
4 changes: 3 additions & 1 deletion packages/kit-headless/src/components/select/select-item.tsx
Original file line number Diff line number Diff line change
@@ -61,7 +61,9 @@ export const HSelectItem = component$<SelectItemProps>((props) => {
if (disabled) return;

if (context.highlightedIndexSig.value === _index) {
itemRef.value?.focus({ preventScroll: true });
if (!isServer) {
itemRef.value?.focus({ preventScroll: true });
}
return true;
} else {
return false;