File tree Expand file tree Collapse file tree 1 file changed +22
-13
lines changed Expand file tree Collapse file tree 1 file changed +22
-13
lines changed Original file line number Diff line number Diff line change @@ -5,21 +5,30 @@ export default {
55 name: ' CDropdownItem' ,
66 props: propsFactory (),
77 render (h ) {
8+ const data = {
9+ props: this ._props ,
10+ staticClass: ' dropdown-item' ,
11+ attrs: { role: ' menuitem' },
12+ on: {
13+ // listeners added, due to component was previously functional for compatibility
14+ ... this .$listeners ,
15+ click : (e ) => {
16+ this .$parent .$emit (' dropdown-close' )
17+ this .$emit (' click' , e)
18+ }
19+ }
20+ }
21+ if (this .to ) {
22+ data .nativeOn = {
23+ click : (e ) => {
24+ this .$parent .$emit (' dropdown-close' )
25+ this .$emit (' click' , e)
26+ }
27+ }
28+ }
829 return h (
930 CLink,
10- {
11- props: this ._props ,
12- staticClass: ' dropdown-item' ,
13- attrs: { role: ' menuitem' },
14- on: {
15- // listeners added, due to component was previously functional for compatibility
16- ... this .$listeners ,
17- click : (e ) => {
18- this .$parent .$emit (' dropdown-close' )
19- this .$emit (' click' , e)
20- }
21- }
22- },
31+ data,
2332 this .$slots .default
2433 )
2534 }
You can’t perform that action at this time.
0 commit comments