Skip to content

Commit

Permalink
Merge pull request #872 from sheinsight/fix-3.5.5-beta
Browse files Browse the repository at this point in the history
`Table` 空数据状态下,右侧有固定列时,横向滚动时右侧可能有内容露底显示问题
  • Loading branch information
saint3347 authored Dec 16, 2024
2 parents 32c4ff7 + 1584e1c commit 9201dfd
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "sheinx",
"private": true,
"version": "3.5.5-beta.2",
"version": "3.5.5-beta.3",
"description": "A react library developed with sheinx",
"module": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
15 changes: 11 additions & 4 deletions packages/base/src/table/table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ const virtualScrollerStyle = {
width: '100%',
};

const emptyStyle = {
...virtualScrollerStyle,
height: 0,
};
const scrollWrapperStyle = { flex: 1, minHeight: 0, minWidth: 0, display: 'flex' };

const emptyRef = { current: null };
Expand All @@ -64,6 +60,17 @@ export default <Item, Value>(props: TableProps<Item, Value>) => {

const browserScrollbarWidth = useScrollbarWidth();

const emptyStyle = {
...virtualScrollerStyle,
overflow: 'auto hidden',
position: 'absolute',
zIndex: 1,
bottom: 0,
left: 0,
right: 0,
height: browserScrollbarWidth,
};

if (props.fixed) {
devUseWarning.deprecated('fixed', 'virtual', 'Table');
}
Expand Down
5 changes: 2 additions & 3 deletions packages/base/src/tabs/tabs-panel.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import classNames from 'classnames';
import { useEffect, useLayoutEffect, useRef } from 'react';
import { useLayoutEffect, useRef } from 'react';
import { TabsClasses } from './tabs.type';
import { useTabsContext } from '@sheinx/hooks';
import { TabsPanelProps } from './tabs-panel.type';
Expand All @@ -10,7 +10,7 @@ const TabsPanel = (props: TabsPanelProps) => {

const panelStyle = jssStyle?.tabs?.() || ({} as TabsClasses);

const { active, lazy, setTabs, tabs, color } = useTabsContext<TabData>();
const { active, lazy, setTabs, color } = useTabsContext<TabData>();
const isActive = active === id;
const keekAlive = useRef(false);

Expand All @@ -37,7 +37,6 @@ const TabsPanel = (props: TabsPanelProps) => {
return () => {
// Panel卸载了通知父组件,去销毁相应的TabsHeader
setTabs(prev => {
const index = prev.findIndex(item => item.id === id)
return prev.filter(item => item.id !== id)
})
}
Expand Down
9 changes: 9 additions & 0 deletions packages/shineout/src/table/__doc__/changelog.cn.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
## 3.5.5-beta.3
2024-12-16

### 🐞 BugFix
- `Table` 空数据状态下,右侧有固定列时,横向滚动时右侧可能有内容露底显示问题 ([#872](https://github.com/sheinsight/shineout-next/pull/872))

### 💎 Enhancement
- `Table` 空数据状态下,tbody区域可展示横向滚动条 ([#872](https://github.com/sheinsight/shineout-next/pull/872))

## 3.5.4
2024-12-12

Expand Down

0 comments on commit 9201dfd

Please sign in to comment.