Skip to content

Commit

Permalink
chore: publish 0.40.5 (#1387)
Browse files Browse the repository at this point in the history
* chore: publish 0.40.5

* fix: collapse code

* chore: changelog's changes

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
honkinglin and github-actions[bot] authored Aug 29, 2022
1 parent 21a8055 commit 98744d2
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 8 deletions.
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,25 @@ toc: false
spline: explain
---

## 🌈 0.40.5 `2022-08-29`
### 🚀 Features
- `Form`: 新增 `useForm` hook 获取 form 实例 & 支持 `initialData` 全局设置初始值 @HQ-Lin ([#1351](https://github.com/Tencent/tdesign-react/pull/1351))
- `DatePicker`: 优化不设置 `valueType` 场景下与 `format` 一致 @HQ-Lin ([#1382](https://github.com/Tencent/tdesign-react/pull/1382))
- `Dialog`: 非模态对话框优化拖拽事件鼠标表现 @huoyuhao ([#1355](https://github.com/Tencent/tdesign-react/pull/1355))
- `Transfer`: 支持 `showCheckAll` api @HelKyle ([#1385](https://github.com/Tencent/tdesign-react/pull/1385))

### 🐞 Bug Fixes
- `InputAdornment`: 修复在 form 组件下 disabled 设置问题 @HQ-Lin ([#1381](https://github.com/Tencent/tdesign-react/pull/1381))
- `Slider`: 修复点击 marks 触发 cannot read properties of null 异常 @PBK-B ([#1297](https://github.com/Tencent/tdesign-react/pull/1297))
- `Upload`: 支持受控使用时`files`可设置为null @uyarn ([#1358](https://github.com/Tencent/tdesign-react/pull/1358))
- `Popup`: 修复 popup 显示状态点击页面事件重复触发问题 @HQ-Lin ([#1371](https://github.com/Tencent/tdesign-react/pull/1371))
- `Alert`: 增加关闭动画 && 修复 `onClosed` 回调事件 @HelKyle ([#1368](https://github.com/Tencent/tdesign-react/pull/1368))
- `Select`: option 设置 content 未生效问题 @carolin913 ([#1383](https://github.com/Tencent/tdesign-react/pull/1383))
- `Table`:
- 修复 tree-select 首次渲染出现 key 为 undefined 的问题 @HelKyle ([#1332](https://github.com/Tencent/tdesign-react/pull/1332))
- 修复排序按钮的样式问题 @uyarn ([#1384](https://github.com/Tencent/tdesign-react/pull/1384))
- 允许在表头分割线一定范围内触发列宽调整逻辑 @ZTao-z ([#1378](https://github.com/Tencent/tdesign-react/pull/1378))

## 🌈 0.40.4 `2022-08-22`
### 🚀 Features
- `Table`:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "tdesign-react",
"purename": "tdesign",
"version": "0.40.4",
"version": "0.40.5",
"description": "TDesign Component for React",
"title": "tdesign-react",
"main": "lib/index.js",
Expand Down
2 changes: 1 addition & 1 deletion site/test-coverage.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 2 additions & 6 deletions src/collapse/CollapsePanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,12 @@ const CollapsePanel = (props: CollapsePanelProps) => {
const bodyRef = useRef<HTMLDivElement>();
const isDisabled = disabled || disableAll;

const initDefaultExpandAll = useRef(false);
useEffect(() => {
if (initDefaultExpandAll) {
return;
}
initDefaultExpandAll.current = true;
if (defaultExpandAll) {
updateCollapseValue(innerValue);
}
}, [updateCollapseValue, defaultExpandAll, innerValue]);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);

const isActive = Array.isArray(collapseValue) ? collapseValue.includes(innerValue) : collapseValue === innerValue;

Expand Down

0 comments on commit 98744d2

Please sign in to comment.