Skip to content

Commit 43cbe32

Browse files
authored
Add html_size prop to Select (#725)
1 parent 4bf23cf commit 43cbe32

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/components/input/Select.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import RBFormSelect from 'react-bootstrap/FormSelect';
88
* list of dictionaries with keys label, value and disabled.
99
*/
1010
const Select = props => {
11-
const {className, class_name, ...otherProps} = props;
11+
const {className, class_name, html_size, ...otherProps} = props;
1212

1313
const handleChange = e => {
1414
if (props.setProps) {
@@ -31,6 +31,7 @@ const Select = props => {
3131
)}
3232
onChange={handleChange}
3333
className={class_name || className}
34+
htmlSize={html_size}
3435
>
3536
<option value="" disabled hidden>
3637
{props.placeholder}
@@ -167,6 +168,13 @@ Select.propTypes = {
167168
*/
168169
size: PropTypes.string,
169170

171+
/**
172+
* This represents the number of rows in the select that should be visible at
173+
* one time. It will result in the Select being rendered as a scrolling list
174+
* box rather than a dropdown.
175+
*/
176+
html_size: PropTypes.string,
177+
170178
/**
171179
* Used to allow user interactions in this component to be persisted when
172180
* the component - or the page - is refreshed. If `persisted` is truthy and

0 commit comments

Comments
 (0)