diff --git a/frontend/src/components/base/BaseScrollbar.vue b/frontend/src/components/base/BaseScrollbar.vue index a9f520c57..2cb916cc3 100644 --- a/frontend/src/components/base/BaseScrollbar.vue +++ b/frontend/src/components/base/BaseScrollbar.vue @@ -70,7 +70,7 @@ const rootClasses = computed(() => [ props.maxHeight || props.height ? undefined : 'h-full', ]) const wrapClasses = computed(() => [ - 'base-scrollbar-wrap min-h-0 max-h-[inherit] overflow-auto outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--cp-info-border)', + 'base-scrollbar-wrap min-h-0 max-h-[inherit] overflow-auto outline-none', props.maxHeight ? undefined : 'h-full', ]) const verticalTrackClass = computed(() => diff --git a/frontend/src/components/base/BaseTable/index.vue b/frontend/src/components/base/BaseTable/index.vue index d1bd599df..cfa2518de 100644 --- a/frontend/src/components/base/BaseTable/index.vue +++ b/frontend/src/components/base/BaseTable/index.vue @@ -3,7 +3,7 @@ import type { BaseTableColumn, BaseTableSort, ResolvedTableColumn } from './colu import type { BaseTablePagination as BaseTablePaginationConfig } from './pagination' import { Triangle } from '@lucide/vue' -import { computed, shallowRef, useSlots, watch } from 'vue' +import { computed, shallowRef, useSlots, useTemplateRef, watch } from 'vue' import BaseEmpty from '../BaseEmpty.vue' import BaseScrollbar from '../BaseScrollbar.vue' import BaseTablePagination from './BaseTablePagination.vue' @@ -89,9 +89,15 @@ const displayRows = computed(() => props.loading && props.rows.length === 0 ? retainedRows.value : props.rows, ) const hasRows = computed(() => displayRows.value.length > 0) +const headerWrapRef = useTemplateRef('headerWrap') +const bodyScrollbarRef = useTemplateRef>('bodyScrollbar') +const tableViewRef = useTemplateRef('tableView') const { horizontalScrolled, horizontalCanScrollRight, handleTableScroll } = useHorizontalStickyShadow({ hasRows, + headerWrapRef, + bodyScrollbarRef, + tableViewRef, watchSources: () => [displayRows.value.length, props.minWidth], }) @@ -216,11 +222,11 @@ function sortButtonLabel(column: BaseTableColumn) {