Skip to content

Commit

Permalink
fix(VSelect): update lastItem when selection changes with hideSelected
Browse files Browse the repository at this point in the history
fixes #17085
  • Loading branch information
KaelWD committed Jun 1, 2023
1 parent e6731e0 commit b121493
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/vuetify/src/components/VSelect/VSelect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,11 @@ export default baseMixins.extend<options>().extend({
this.$refs.menu?.updateDimensions()
})
}
if (this.hideSelected) {
this.$nextTick(() => {
this.onScroll()
})
}
},
isMenuActive (val) {
window.setTimeout(() => this.onMenuActiveChange(val))
Expand Down

2 comments on commit b121493

@creage
Copy link

@creage creage commented on b121493 Jul 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KaelWD This change fails our tests

TypeError: Cannot set properties of undefined (setting 'scrollTop')

      at node_modules/vuetify/dist/webpack:/Vuetify/src/components/VSelect/VSelect.ts:757:38
      at invokeTheCallbackFunction (node_modules/jsdom/lib/jsdom/living/generated/Function.js:19:26)
      at runAnimationFrameCallbacks (node_modules/jsdom/lib/jsdom/browser/Window.js:603:13)
      at Timeout._onTimeout (node_modules/jsdom/lib/jsdom/browser/Window.js:581:11)

@olivierkrener
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KaelWD This change fails our tests

TypeError: Cannot set properties of undefined (setting 'scrollTop')

      at node_modules/vuetify/dist/webpack:/Vuetify/src/components/VSelect/VSelect.ts:757:38
      at invokeTheCallbackFunction (node_modules/jsdom/lib/jsdom/living/generated/Function.js:19:26)
      at runAnimationFrameCallbacks (node_modules/jsdom/lib/jsdom/browser/Window.js:603:13)
      at Timeout._onTimeout (node_modules/jsdom/lib/jsdom/browser/Window.js:581:11)

Same error here

Please sign in to comment.