Fixed #3849 - TabView: Scrollable Starting/Ending Nav Arrow Blocks First/Last Tab
parent
f2fc192c1a
commit
ff609bf403
|
@ -83,10 +83,10 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import BaseComponent from 'primevue/basecomponent';
|
import BaseComponent from 'primevue/basecomponent';
|
||||||
import Ripple from 'primevue/ripple';
|
|
||||||
import { DomHandler, UniqueComponentId } from 'primevue/utils';
|
|
||||||
import ChevronLeftIcon from 'primevue/icon/chevronleft';
|
import ChevronLeftIcon from 'primevue/icon/chevronleft';
|
||||||
import ChevronRightIcon from 'primevue/icon/chevronright';
|
import ChevronRightIcon from 'primevue/icon/chevronright';
|
||||||
|
import Ripple from 'primevue/ripple';
|
||||||
|
import { DomHandler, UniqueComponentId } from 'primevue/utils';
|
||||||
export default {
|
export default {
|
||||||
name: 'TabView',
|
name: 'TabView',
|
||||||
extends: BaseComponent,
|
extends: BaseComponent,
|
||||||
|
@ -191,7 +191,7 @@ export default {
|
||||||
},
|
},
|
||||||
onPrevButtonClick() {
|
onPrevButtonClick() {
|
||||||
const content = this.$refs.content;
|
const content = this.$refs.content;
|
||||||
const width = DomHandler.getWidth(content) - this.getVisibleButtonWidths();
|
const width = DomHandler.getWidth(content);
|
||||||
const pos = content.scrollLeft - width;
|
const pos = content.scrollLeft - width;
|
||||||
|
|
||||||
content.scrollLeft = pos <= 0 ? 0 : pos;
|
content.scrollLeft = pos <= 0 ? 0 : pos;
|
||||||
|
|
Loading…
Reference in New Issue