No flags found
Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.
e.g., #unittest #integration
#production #enterprise
#frontend #backend
Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.
e.g., #unittest #integration
#production #enterprise
#frontend #backend
346 | 346 | const offsetLeft = rtl |
|
347 | 347 | ? (widths.content - selectedElement.offsetLeft - clientWidth) |
|
348 | 348 | : selectedElement.offsetLeft |
|
349 | - | ||
350 | 349 | if (rtl) { |
|
351 | 350 | currentScrollOffset = -currentScrollOffset |
|
352 | 351 | } |
|
353 | - | ||
354 | 352 | const totalWidth = widths.wrapper + currentScrollOffset |
|
355 | 353 | const itemOffset = clientWidth + offsetLeft |
|
356 | 354 | const additionalOffset = clientWidth * 0.4 |
|
357 | - | ||
358 | 355 | if (offsetLeft <= currentScrollOffset) { |
|
359 | 356 | currentScrollOffset = Math.max(offsetLeft - additionalOffset, 0) |
|
360 | 357 | } else if (totalWidth <= itemOffset) { |
|
361 | 358 | currentScrollOffset = Math.min(currentScrollOffset - (totalWidth - itemOffset - additionalOffset), widths.content - widths.wrapper) |
|
362 | 359 | } |
|
363 | - | ||
364 | 360 | return rtl ? -currentScrollOffset : currentScrollOffset |
|
365 | 361 | }, |
|
366 | 362 | calculateCenteredOffset (selectedElement: HTMLElement, widths: Widths, rtl: boolean): number { |
381 | 377 | wrapper: this.$refs.wrapper ? this.$refs.wrapper.clientWidth : 0, |
|
382 | 378 | }, this.$vuetify.rtl, this.scrollOffset) |
|
383 | 379 | }, |
|
384 | - | setWidths /* istanbul ignore next */ () { |
|
385 | - | window.requestAnimationFrame(() => { |
|
386 | - | const { content, wrapper } = this.$refs |
|
387 | - | ||
388 | - | this.widths = { |
|
389 | - | content: content ? content.clientWidth : 0, |
|
390 | - | wrapper: wrapper ? wrapper.clientWidth : 0, |
|
391 | - | } |
|
392 | - | ||
393 | - | this.isOverflowing = this.widths.wrapper < this.widths.content |
|
394 | - | ||
395 | - | this.scrollIntoView() |
|
396 | - | }) |
|
380 | + | setWidths /* istanbul ignore next */ () { |
|
381 | + | if (typeof window === 'undefined') { |
|
382 | + | this.widths = { content: 0, wrapper: 0 } |
|
383 | + | setTimeout(() => { |
|
384 | + | this.setWidths() |
|
385 | + | }, 1000) |
|
386 | + | } else if (this.widths === { content: 0, wrapper: 0 }) { |
|
387 | + | window.requestAnimationFrame(() => { |
|
388 | + | const { content, wrapper } = this.$refs |
|
389 | + | this.widths = { |
|
390 | + | content: typeof content !== 'undefined' ? content.clientWidth : 0, |
|
391 | + | wrapper: typeof wrapper !== 'undefined' ? wrapper.clientWidth : 0, |
|
392 | + | } |
|
393 | + | this.isOverflowing = this.widths.wrapper < this.widths.content |
|
394 | + | this.scrollIntoView() |
|
395 | + | }) |
|
396 | + | } |
|
397 | 397 | }, |
|
398 | 398 | }, |
|
399 | - | ||
400 | 399 | render (h): VNode { |
|
401 | 400 | return h('div', this.genData(), [ |
|
402 | 401 | this.genPrev(), |
Learn more Showing 1 files with coverage changes found.
packages/vuetify/src/components/VSelect/VSelect.ts
Files | Coverage |
---|---|
packages/vuetify/src | -0.01% 86.93% |
Project Totals (242 files) | 86.93% |
#12017
d55a951
b75a864
03c1143
eb3d094
f2f4f3a
543117e
0dc61bd
e7213cc
a0d7a44
6a44fea
9a05858
b7ce350
1a41d2d
a54559f
61721fc
f1f9f60
a44ff36
b93e32c
621a391
87ff8da
1e74f17
95d173e
bad1db0
87fbab6
6325c0c
7d7685f
397cedd
1a77684
3fc7671
d747da2
e6f058c
#12017
6ac659b
#12017
3b765d1
#12017
7df14f5
#12017
54aa9d2
#12017
6334144
#12017
79debfe
#12017
102eb15
#12017
28f334b
#12017
131c8f8
#12017
2d61b9b
#12017
cbea797
#12017
7711d0d
#12017
630e462
#12017
df68e15
#12017
12cb842
#12017
86af024
#12017
61382ff
#12017
1c468c2
#12017
4b091f1
#12017
3a98f6b
b60f96a
482fc1a
3c1148a
6d32655
6a0c139
bc47e86
ab8650a
12df126
5e25c7f
5d417b9
084e465