File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -65,6 +65,8 @@ export interface SelectProps {
6565 borderRadius ?: string ;
6666 required ?: boolean ;
6767 isPlaceholderFloating ?: boolean ;
68+ /** Allow popover to stretch to the full width of its activator */
69+ fullWidth ?: boolean ;
6870}
6971
7072export const Select = ( {
@@ -103,6 +105,7 @@ export const Select = ({
103105 borderRadius,
104106 required,
105107 isPlaceholderFloating,
108+ fullWidth,
106109} : SelectProps ) => {
107110 const [ internalPopoverActive , setInternalPopoverActive ] = useState ( false ) ;
108111 const popoverActive =
@@ -284,7 +287,7 @@ export const Select = ({
284287 preventFocusOnClose
285288 preferredAlignment = "left"
286289 preferredPosition = "below"
287- fullWidth
290+ fullWidth = { fullWidth }
288291 fitContent = { optionListFitContent }
289292 zIndexOverride = { zIndexOverride }
290293 >
@@ -297,7 +300,7 @@ export const Select = ({
297300 onSelect = { onSelect }
298301 sections = { sections }
299302 selectedValues = { selectedValues }
300- width = { width }
303+ width = { fullWidth === false ? undefined : width }
301304 onMenuClose = { handleClose }
302305 noOptionsMessage = {
303306 optionsPlaceholderProps &&
You can’t perform that action at this time.
0 commit comments