Skip to content

Commit 82c04c0

Browse files
committed
fix(pf4): enable searchable select to use space key.
1 parent 1bb9190 commit 82c04c0

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

packages/pf4-component-mapper/demo/demo-schemas/select-schema.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,5 @@ const selectSchema = {
164164
};
165165

166166
export default {
167-
...selectSchema,
168-
fields: [selectSchema.fields[0]]
167+
...selectSchema
169168
};

packages/pf4-component-mapper/src/common/select/input.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ const Input = ({ inputRef, isSearchable, isDisabled, getInputProps, value, ...pr
1414
{...{
1515
...inputProps,
1616
value: inputProps.value || '',
17+
onKeyDown: (event, ...args) => {
18+
event.stopPropagation();
19+
inputProps.onKeyDown(event, ...args);
20+
},
1721
onChange: inputProps.onChange || Function
1822
}}
1923
/>

0 commit comments

Comments
 (0)