Fixed #3849 - TabView: Scrollable Starting/Ending Nav Arrow Blocks First/Last Tab

pull/3852/head
Tuğçe Küçükoğlu 2023-04-11 13:29:27 +03:00
parent f2fc192c1a
commit ff609bf403
1 changed files with 3 additions and 3 deletions

View File

@ -83,10 +83,10 @@
<script>
import BaseComponent from 'primevue/basecomponent';
import Ripple from 'primevue/ripple';
import { DomHandler, UniqueComponentId } from 'primevue/utils';
import ChevronLeftIcon from 'primevue/icon/chevronleft';
import ChevronRightIcon from 'primevue/icon/chevronright';
import Ripple from 'primevue/ripple';
import { DomHandler, UniqueComponentId } from 'primevue/utils';
export default {
name: 'TabView',
extends: BaseComponent,
@ -191,7 +191,7 @@ export default {
},
onPrevButtonClick() {
const content = this.$refs.content;
const width = DomHandler.getWidth(content) - this.getVisibleButtonWidths();
const width = DomHandler.getWidth(content);
const pos = content.scrollLeft - width;
content.scrollLeft = pos <= 0 ? 0 : pos;