Skip to content

Commit

Permalink
Change key back to option.value
Browse files Browse the repository at this point in the history
  • Loading branch information
mendrew committed Jul 31, 2024
1 parent 905bbbe commit 914ed52
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ export const ChipsInputBase = <O extends ChipOption>({
onKeyDown={disabled ? undefined : handleListboxKeyDown}
>
{value.map((option, index) => (
<React.Fragment key={`${typeof option.value}-${option.label}`}>
<React.Fragment key={`${typeof option.value}-${option.value}`}>
{renderChip(
{
'Component': 'div',
Expand Down
2 changes: 1 addition & 1 deletion packages/vkui/src/components/ChipsSelect/ChipsSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ export const ChipsSelect = <Option extends ChipOption>({
);
}
return (
<React.Fragment key={`${typeof option.value}-${option.label}`}>
<React.Fragment key={`${typeof option.value}-${option.value}`}>
{renderOption(
{
id: dropdownItemId,
Expand Down
2 changes: 1 addition & 1 deletion packages/vkui/src/components/CustomSelect/CustomSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,7 @@ export function CustomSelect<OptionInterfaceT extends CustomSelectOptionInterfac
const selected = index === selectedOptionIndex;

return (
<React.Fragment key={`${option.value}`}>
<React.Fragment key={`${typeof option.value}-${option.value}`}>
{renderOptionProp({
option,
hovered,
Expand Down

0 comments on commit 914ed52

Please sign in to comment.