feat(Boxer): add @tanstack/react-virtual dependency and enhance Boxer component with improved option handling and ref exposure

This commit is contained in:
2026-01-17 19:33:19 +02:00
parent a8e9c50290
commit 1fb57d3454
7 changed files with 113 additions and 53 deletions

View File

@@ -24,6 +24,9 @@ const useBoxerOptions = (props: UseBoxerOptionsProps) => {
key={`${item.value}-${index}`}
value={String(index)}
active={isSelected}
onClick={() => {
onOptionSubmit(index);
}}
>
{multiSelect ? (
<div style={{ display: 'flex', alignItems: 'center', gap: '8px' }}>
@@ -36,7 +39,7 @@ const useBoxerOptions = (props: UseBoxerOptionsProps) => {
</Combobox.Option>
);
});
}, [boxerData, value, multiSelect]);
}, [boxerData, value, multiSelect, onOptionSubmit]);
return { options };
};