File tree Expand file tree Collapse file tree
components/dash-core-components/src/utils Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -92,21 +92,28 @@ export const Option: React.FC<OptionProps> = ({
9292 aria-selected = { isSelected }
9393 style = { optionStyle }
9494 >
95- < input
96- type = { inputType }
97- checked = { isSelected }
98- name = { id }
99- value = {
100- typeof option . value === 'boolean'
101- ? `${ option . value } `
102- : option . value
103- }
104- disabled = { ! ! option . disabled }
105- onChange = { ( ) => onChange ( option ) }
106- readOnly
107- className = { inputClassNames . join ( ' ' ) }
108- style = { inputStyle }
109- />
95+ < span className = "dash-options-list-option-wrapper" >
96+ < input
97+ type = { inputType }
98+ checked = { isSelected }
99+ name = { id }
100+ value = {
101+ typeof option . value === 'boolean'
102+ ? `${ option . value } `
103+ : option . value
104+ }
105+ disabled = { ! ! option . disabled }
106+ onChange = { ( ) => onChange ( option ) }
107+ onKeyUp = { e => {
108+ if ( e . key === 'Enter' && inputType === 'checkbox' ) {
109+ onChange ( option ) ;
110+ }
111+ } }
112+ readOnly
113+ className = { inputClassNames . join ( ' ' ) }
114+ style = { inputStyle }
115+ />
116+ </ span >
110117 < span
111118 className = { labelClassNames . join ( ' ' ) }
112119 style = { labelStyle }
You can’t perform that action at this time.
0 commit comments