feat(Boxer): add @tanstack/react-virtual dependency and enhance Boxer component with improved option handling and ref exposure
This commit is contained in:
@@ -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 };
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user