-
Notifications
You must be signed in to change notification settings - Fork 377
Added OUIA compatibility for Dropdown #3135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@redallen please help with type matching. Build failed due to this issue. |
|
@quarckster looks like the problem was with incorrect diff --git a/packages/patternfly-4/react-core/src/components/Dropdown/Dropdown.tsx b/packages/patternfly-4/react-core/src/components/Dropdown/Dropdown.tsx
index 4cc061c65..86ee33ed3 100644
--- a/packages/patternfly-4/react-core/src/components/Dropdown/Dropdown.tsx
+++ b/packages/patternfly-4/react-core/src/components/Dropdown/Dropdown.tsx
@@ -23,7 +23,7 @@ export interface DropdownProps extends React.HTMLProps<HTMLDivElement> {
/** Toggle for the dropdown, examples: <DropdownToggle> or <DropdownToggleCheckbox> */
toggle: React.ReactElement<any>;
/** Function callback called when user selects item */
- onSelect?(event: React.SyntheticEvent<HTMLDivElement>): void;
+ onSelect?(event?: React.SyntheticEvent<HTMLDivElement>): void;
/** Flag to indicate if the first dropdown item should gain initial focus, set false when adding
* a specific auto-focus item (like a current selection) otherwise leave as true
*/
diff --git a/packages/patternfly-4/react-core/src/components/Dropdown/DropdownWithContext.tsx b/packages/patternfly-4/react-core/src/components/Dropdown/DropdownWithContext.tsx
index fe1ea2218..307e825e8 100644
--- a/packages/patternfly-4/react-core/src/components/Dropdown/DropdownWithContext.tsx
+++ b/packages/patternfly-4/react-core/src/components/Dropdown/DropdownWithContext.tsx
@@ -21,7 +21,7 @@ class DropdownWithContext extends React.Component<DropdownProps & InjectedOuiaPr
isGrouped: false,
position: DropdownPosition.left,
direction: DropdownDirection.down,
- onSelect: Function.prototype,
+ onSelect: (): void => undefined,
autoFocus: true,
ouiaComponentType: 'Dropdown'
};
Also don't forget to run |
|
@quarckster I believe @karelhala is correct. This mismatching type for |
c18bd0f to
77e90dc
Compare
|
PatternFly-React preview: https://patternfly-react-pr-3135.surge.sh |
77e90dc to
377ef0b
Compare
Codecov Report
@@ Coverage Diff @@
## master #3135 +/- ##
==========================================
- Coverage 68.98% 68.98% -0.01%
==========================================
Files 858 858
Lines 23612 23621 +9
Branches 1887 1889 +2
==========================================
+ Hits 16288 16294 +6
- Misses 6364 6366 +2
- Partials 960 961 +1
Continue to review full report at Codecov.
|
|
Looks like the table snapshots were not updated @quarckster can you run |
377ef0b to
a7390a7
Compare
|
@redallen @karelhala @dlabrecq tests passed |
|
Your changes have been released in:
Thanks for your contribution! 🎉 |
Part of #2423
What: Added OUIA props to Dropdown as per #2423