diff --git a/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap b/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap index b4c8d31e0b3e..67dc052c64f8 100644 --- a/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap +++ b/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap @@ -1961,6 +1961,16 @@ Map { "searchContainerClass": Object { "type": "string", }, + "size": Object { + "args": Array [ + Array [ + "sm", + "md", + "lg", + ], + ], + "type": "oneOf", + }, "tabIndex": Object { "args": Array [ Array [ @@ -7062,6 +7072,16 @@ Map { "searchContainerClass": Object { "type": "string", }, + "size": Object { + "args": Array [ + Array [ + "sm", + "md", + "lg", + ], + ], + "type": "oneOf", + }, "tabIndex": Object { "args": Array [ Array [ diff --git a/packages/react/src/components/DataTable/TableToolbarSearch.js b/packages/react/src/components/DataTable/TableToolbarSearch.js index 23c4f3b3424c..c468395b501f 100644 --- a/packages/react/src/components/DataTable/TableToolbarSearch.js +++ b/packages/react/src/components/DataTable/TableToolbarSearch.js @@ -39,6 +39,7 @@ const TableToolbarSearch = ({ id, onBlur, onFocus, + size = 'lg', ...rest }) => { const { current: controlled } = useRef(expandedProp !== undefined); @@ -111,6 +112,7 @@ const TableToolbarSearch = ({ onFocus ? (event) => onFocus(event, handleExpand) : handleOnFocus } onBlur={onBlur ? (event) => onBlur(event, handleExpand) : handleOnBlur} + size={size} {...rest} /> ); @@ -198,6 +200,11 @@ TableToolbarSearch.propTypes = { */ searchContainerClass: PropTypes.string, + /** + * Specify the size of the Search + */ + size: PropTypes.oneOf(['sm', 'md', 'lg']), + /** * Optional prop to specify the tabIndex of the (in expanded state) or the container (in collapsed state) */ diff --git a/packages/react/src/components/DataTable/__tests__/__snapshots__/DataTable-test.js.snap b/packages/react/src/components/DataTable/__tests__/__snapshots__/DataTable-test.js.snap index 7b0c6053969a..641b65f4603e 100644 --- a/packages/react/src/components/DataTable/__tests__/__snapshots__/DataTable-test.js.snap +++ b/packages/react/src/components/DataTable/__tests__/__snapshots__/DataTable-test.js.snap @@ -2317,13 +2317,14 @@ exports[`DataTable should render 1`] = ` onClear={[Function]} onFocus={[Function]} placeholder="Filter table" + size="lg" tabIndex="0" type="text" value="" >