From 327e96b7c641f10899ce2f0d20420a98e652a0e5 Mon Sep 17 00:00:00 2001 From: Ed Leeks Date: Thu, 12 Aug 2021 17:06:05 +0100 Subject: [PATCH] feat(filterable-select): add tooltipPosition prop to interface --- .../select/filterable-select/filterable-select.component.js | 4 ++++ .../select/filterable-select/filterable-select.d.ts | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/components/select/filterable-select/filterable-select.component.js b/src/components/select/filterable-select/filterable-select.component.js index 346d8e2122..71d83120e3 100644 --- a/src/components/select/filterable-select/filterable-select.component.js +++ b/src/components/select/filterable-select/filterable-select.component.js @@ -38,6 +38,7 @@ const FilterableSelect = React.forwardRef( onListScrollBottom, tableHeader, multiColumn, + tooltipPosition, ...textboxProps }, inputRef @@ -452,6 +453,7 @@ const FilterableSelect = React.forwardRef( onKeyDown: handleTextboxKeydown, onChange: handleTextboxChange, onMouseDown: handleTextboxMouseDown, + tooltipPosition, ...textboxProps, }; } @@ -546,6 +548,8 @@ FilterableSelect.propTypes = { isLoading: PropTypes.bool, /** A callback that is triggered when a user scrolls to the bottom of the list */ onListScrollBottom: PropTypes.func, + /** Overrides the default tooltip position */ + tooltipPosition: PropTypes.oneOf(["top", "bottom", "left", "right"]), }; export default FilterableSelect; diff --git a/src/components/select/filterable-select/filterable-select.d.ts b/src/components/select/filterable-select/filterable-select.d.ts index abad55c699..bd3befa9c7 100644 --- a/src/components/select/filterable-select/filterable-select.d.ts +++ b/src/components/select/filterable-select/filterable-select.d.ts @@ -35,6 +35,8 @@ export interface FilterableSelectProps extends FormInputPropTypes { tableHeader?: React.ReactNode; /** The selected value(s), when the component is operating in controlled mode */ value?: string | object; + /** Overrides the default tooltip position */ + tooltipPosition?: "top" | "bottom" | "left" | "right"; } declare function FilterableSelect(props: FilterableSelectProps & React.RefAttributes): JSX.Element;