+25
-0
lines changedFilter options
+25
-0
lines changed Original file line number Diff line number Diff line change
@@ -60,6 +60,10 @@ export const props = {
60
60
type: String,
61
61
default: () => getComponentConfig(NAME, 'splitVariant')
62
62
},
63
+
splitClass: {
64
+
type: [String, Array],
65
+
default: null
66
+
},
63
67
splitButtonType: {
64
68
type: String,
65
69
default: 'button',
@@ -144,6 +148,7 @@ export const BDropdown = /*#__PURE__*/ Vue.extend({
144
148
{
145
149
ref: 'button',
146
150
props: btnProps,
151
+
class: this.splitClass,
147
152
attrs: {
148
153
id: this.safeId('_BV_button_')
149
154
},
Original file line number Diff line number Diff line change
@@ -368,6 +368,21 @@ describe('dropdown', () => {
368
368
wrapper.destroy()
369
369
})
370
370
371
+
it('split should have class specified in split class property', () => {
372
+
const splitClass = 'custom-button-class'
373
+
const wrapper = mount(BDropdown, {
374
+
attachToDocument: true,
375
+
propsData: {
376
+
splitClass,
377
+
split: true
378
+
}
379
+
})
380
+
const $buttons = wrapper.findAll('button')
381
+
const $split = $buttons.at(0)
382
+
383
+
expect($split.classes()).toContain(splitClass)
384
+
})
385
+
371
386
it('menu should have class dropdown-menu-right when prop right set', async () => {
372
387
const wrapper = mount(BDropdown, {
373
388
attachToDocument: true,
Original file line number Diff line number Diff line change
@@ -96,6 +96,11 @@
96
96
"prop": "splitButtonType",
97
97
"description": "Value to place in the 'type' attribute on the split button: 'button', 'submit', 'reset'"
98
98
},
99
+
{
100
+
"prop": "splitClass",
101
+
"version": "2.2.0",
102
+
"description": "CSS class (or classes) to add to the split button"
103
+
},
99
104
{
100
105
"prop": "boundary",
101
106
"description": "The boundary constraint of the menu: 'scrollParent', 'window', 'viewport', or a reference to an HTMLElement"
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4