Skip to content

Commit ae7266f

Browse files
committed
feat(OUIA): te pf-dropdown component assigns ouia attributes to the menu dropdown element
1 parent 3a6ff51 commit ae7266f

File tree

3 files changed

+276
-253
lines changed

3 files changed

+276
-253
lines changed

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# Change Log
22
All notable changes to this project will be documented in this file.
33

4+
## [0.3.5] - 2022-06-25
5+
### Added
6+
- feat(OUIA): te `pf-dropdown` component assigns ouia attributes to the menu dropdown element.
7+
48
## [0.3.4] - 2022-04-29
59
### Fixed
610
- fix(OUIA): restored ouia type `V-PF3/` prefix.
@@ -415,7 +419,8 @@ disabled, as per PatternFly design guidelines.
415419
- `pf-toolbar` component
416420
- `pf-utilization-bar-chart` component
417421

418-
[Unreleased]: https://github.com/mtorromeo/vue-patternfly/compare/v0.3.4...HEAD
422+
[Unreleased]: https://github.com/mtorromeo/vue-patternfly/compare/v0.3.5...HEAD
423+
[0.3.5]: https://github.com/mtorromeo/vue-patternfly/compare/v0.3.4...v0.3.5
419424
[0.3.4]: https://github.com/mtorromeo/vue-patternfly/compare/v0.3.3...v0.3.4
420425
[0.3.3]: https://github.com/mtorromeo/vue-patternfly/compare/v0.3.2...v0.3.3
421426
[0.3.2]: https://github.com/mtorromeo/vue-patternfly/compare/v0.3.1...v0.3.2

src/components/Dropdown.vue

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
</slot> <span v-show="!noCaret" class="caret" />
1616
</button>
1717

18-
<ul ref="dropdown" :class="{'dropdown-menu-right': menuRight}" class="dropdown-menu">
18+
<ul ref="dropdown" v-bind="ouiaMenuProps" :class="{'dropdown-menu-right': menuRight}" class="dropdown-menu">
1919
<slot />
2020
</ul>
2121
</component>
@@ -64,15 +64,24 @@ export default defineComponent({
6464
default: '',
6565
},
6666
noCaret: Boolean,
67+
6768
...ouiaProps,
69+
ouiaMenuId: ouiaProps.ouiaId,
70+
ouiaMenuSafe: ouiaProps.ouiaSafe,
6871
},
6972
7073
emits: {
7174
'update:modelValue': (value: boolean) => value !== undefined,
7275
},
7376
7477
setup(props) {
75-
return useOUIAProps(props);
78+
return {
79+
...useOUIAProps(props),
80+
ouiaMenuProps: useOUIAProps({
81+
ouiaId: props.ouiaMenuId,
82+
ouiaSafe: props.ouiaMenuSafe,
83+
}, { name: 'Dropdown/Menu' }).ouiaProps,
84+
};
7685
},
7786
7887
data(this: void) {

0 commit comments

Comments
 (0)