mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-06-10 18:23:12 +08:00
fix(skills): guard empty options array in Dropdown example
This commit is contained in:
@@ -257,6 +257,8 @@ export function Dropdown({ options, onSelect }: { options: string[]; onSelect: (
|
||||
const [activeIndex, setActiveIndex] = useState(0);
|
||||
const listId = useId();
|
||||
|
||||
if (!options.length) return null;
|
||||
|
||||
const handleKeyDown = (e: React.KeyboardEvent) => {
|
||||
switch (e.key) {
|
||||
case 'ArrowDown':
|
||||
|
||||
Reference in New Issue
Block a user