Vuetify Version: 2.3.1
Vue Version: 2.6.11
Browsers: Chrome 80.0.3987.122
OS: Linux x86_64
:height propI expect dynamic height support
I observe an error that breaks the application

https://codepen.io/scilaris/pen/gOPWLEe
I guess issue is with attempt to get clientHeight from this.$el on created hook
Code snippet from VVirtualScroller.ts
created () {
this.last = this.getLast(0)
},
methods: {
getLast (first: number): number {
const height = parseInt(this.height || 0, 10) || this.$el.clientHeight // we can't get $el on created hook
return first + Math.ceil(height / this.__itemHeight)
},
}
@albertodeago any reason why you used created() instead of mounted()?
@jacekkarczmarczyk honestly I don't remember, but I think it's just wrong. mounted should be used if we check for dom element.
The only thing to notice is that if we remove the height for the component (in the example provided) it should be moved into its parent, otherwise there will be no height to "inherit" by the scroller and it will lose its functionality completely.
Going to create a PR for this soon.
if we remove the height for the component (in the example provided) it should be moved into its parent, otherwise there will be no height to "inherit" by the scroller and it will lose its functionality completely
IMHO if dev doesn't provide scroller's height then he is responsible for setting the height of the scroller's parent
<div style="height: 300px">
<v-scroller />
</div>
works as expected (edit: with mounted() instead of created()), not sure if we should complicate the logic more
Yeah I agree that is a dev responsibility