Skip to content

Commit 2f64367

Browse files
consider cases without value on calculating isFocused
1 parent f86aae0 commit 2f64367

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/scripts/Picklist.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@ export const PicklistItem: FC<PicklistItemProps> = ({
674674
useContext(PicklistContext);
675675
const selected =
676676
selected_ ?? (value != null ? values.indexOf(value) >= 0 : false);
677-
const isFocused = focusedValue === value;
677+
const isFocused = value != null && focusedValue === value;
678678

679679
const onClick = useEventCallback((e: React.SyntheticEvent) => {
680680
if (!disabled && value != null) {

0 commit comments

Comments
 (0)