Skip to content

Commit

Permalink
fix(Form): Enable scrolling for Selects
Browse files Browse the repository at this point in the history
After updating patternfly to v6, the Select component is no longer
scrollable.

This commit enables the scrolling back by setting the `isScrollable`
attribute.
  • Loading branch information
lordrip committed Jan 23, 2025
1 parent 3e1dd93 commit 2dc1766
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ const BeanReferenceFieldComponent = (props: BeanReferenceFieldProps) => {
props,
<>
<Select
isScrollable
id={`${props.name}-bean-select`}
data-testid={`${props.name}-bean-select`}
isOpen={isOpen}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ export const TypeaheadEditor: FunctionComponent<TypeaheadEditorProps> = (props)
props.selectOptions && (
<>
<Select
isScrollable
id="typeahead-select"
isOpen={isOpen}
selected={selected}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ export const TypeaheadField = connectField((props: TypeaheadProps) => {
return wrapField(
props,
<Select
isScrollable
id="create-typeahead-select"
isOpen={isOpen}
selected={selected}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export const PipeErrorHandlerEditor: FunctionComponent<PropsWithChildren<PipeErr
return (
<>
<Select
isScrollable
id={'pipe-error-handler-select'}
data-testid={'pipe-error-handler-select'}
isOpen={isOpen}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export const DSLSelectorToggle: FunctionComponent<ISourceTypeSelector> = (props)

return (
<Select
isScrollable
id="dsl-list-select"
isOpen={isOpen}
selected={currentSchemaType}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export const FlowsMenu: FunctionComponent = () => {
);

return (
<Select id="flows-list-select" isOpen={isOpen} onOpenChange={setIsOpen} toggle={toggle}>
<Select isScrollable id="flows-list-select" isOpen={isOpen} onOpenChange={setIsOpen} toggle={toggle}>
<FlowsList
onClose={() => {
setIsOpen(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ export const FlowTypeSelector: FunctionComponent<ISourceTypeSelector> = (props)

return (
<Select
isScrollable
id="dsl-list-select"
isOpen={isOpen}
selected={currentSchemaType}
Expand Down

0 comments on commit 2dc1766

Please sign in to comment.