Skip to content

Commit 9b345eb

Browse files
committed
fix(v-select): apply custom nudgeBottom
fixes #4713
1 parent a82c492 commit 9b345eb

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

src/components/VSelect/VSelect.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,9 @@ export default {
178178
openOnClick: false,
179179
value: this.isMenuActive,
180180
offsetY: this.offsetY,
181-
nudgeBottom: this.offsetY ? 1 : 0 // convert to int
181+
nudgeBottom: this.nudgeBottom
182+
? this.nudgeBottom
183+
: this.offsetY ? 1 : 0 // convert to int
182184
}
183185
},
184186
listData () {

test/unit/components/VSelect/VSelect3.spec.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,4 +152,23 @@ test('VSelect', ({ mount, compileToFunctions }) => {
152152

153153
expect(change).toHaveBeenCalledTimes(1)
154154
})
155+
156+
// https://github.com/vuetifyjs/vuetify/issues/4713
157+
it('should nudge select menu', () => {
158+
const wrapper = mount(VSelect, {
159+
propsData: {
160+
nudgeTop: 5,
161+
nudgeRight: 5,
162+
nudgeBottom: 5,
163+
nudgeLeft: 5
164+
}
165+
})
166+
167+
const menu = wrapper.vm.$refs.menu
168+
169+
expect(menu.nudgeTop).toBe(5)
170+
expect(menu.nudgeRight).toBe(5)
171+
expect(menu.nudgeBottom).toBe(5)
172+
expect(menu.nudgeLeft).toBe(5)
173+
})
155174
})

0 commit comments

Comments
 (0)