From 186ac3431757bcace7fa24a2b921e2fba28522e1 Mon Sep 17 00:00:00 2001 From: GermanVor Date: Thu, 23 May 2024 00:21:23 +0200 Subject: [PATCH] chore: selectId --- src/components/Select/Select.tsx | 4 +--- .../components/SelectControl/SelectControl.tsx | 4 +--- src/components/Select/types.ts | 1 - src/components/TreeSelect/TreeSelect.tsx | 12 +++++++----- 4 files changed, 9 insertions(+), 12 deletions(-) diff --git a/src/components/Select/Select.tsx b/src/components/Select/Select.tsx index 60e050a0d0..29560533e8 100644 --- a/src/components/Select/Select.tsx +++ b/src/components/Select/Select.tsx @@ -283,8 +283,7 @@ export const Select = React.forwardRef(function }; const uniqId = useUniqId(); - const controlId = id ?? uniqId; - const selectId = `select-${controlId}`; + const selectId = id ?? uniqId; const popupId = `select-popup-${selectId}`; const _renderList = () => { @@ -343,7 +342,6 @@ export const Select = React.forwardRef(function renderControl={renderControl} value={value} popupId={popupId} - id={controlId} selectId={selectId} activeIndex={activeIndex} hasCounter={multiple && hasCounter} diff --git a/src/components/Select/components/SelectControl/SelectControl.tsx b/src/components/Select/components/SelectControl/SelectControl.tsx index 4d68b39252..e817f23993 100644 --- a/src/components/Select/components/SelectControl/SelectControl.tsx +++ b/src/components/Select/components/SelectControl/SelectControl.tsx @@ -71,7 +71,6 @@ export const SelectControl = React.forwardRef(( renderCounter, hasCounter, title, - id, } = props; const showOptionsText = Boolean(selectedOptionsContent); const showPlaceholder = Boolean(placeholder && !showOptionsText); @@ -165,7 +164,6 @@ export const SelectControl = React.forwardRef(( popupId, selectId, activeIndex, - id, }, {value}, ); @@ -175,7 +173,7 @@ export const SelectControl = React.forwardRef((