From 7ea3b307df80f8c3d9510b94d07a4956d3b68325 Mon Sep 17 00:00:00 2001 From: Taylor Jones Date: Thu, 25 Apr 2024 07:27:07 -0500 Subject: [PATCH] fix(tabletoolbarsearch): prefix internally placed id (#16232) --- .../react/src/components/DataTable/TableToolbarSearch.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/react/src/components/DataTable/TableToolbarSearch.tsx b/packages/react/src/components/DataTable/TableToolbarSearch.tsx index 71a276523246..4bfc1c99a91e 100644 --- a/packages/react/src/components/DataTable/TableToolbarSearch.tsx +++ b/packages/react/src/components/DataTable/TableToolbarSearch.tsx @@ -213,7 +213,11 @@ const TableToolbarSearch = ({ disabled={disabled} className={searchClasses} value={value} - id={typeof id !== 'undefined' ? id : uniqueId.toString()} + id={ + typeof id !== 'undefined' + ? id + : `table-toolbar-search-${uniqueId.toString()}` + } labelText={labelText || t('carbon.table.toolbar.search.label')} placeholder={placeholder || t('carbon.table.toolbar.search.placeholder')} onChange={onChange}