Skip to content

Commit

Permalink
fix: compatible with react legacy, not require react/jsx-runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
hemengke1997 committed Jan 21, 2024
1 parent 084c781 commit 6bb0115
Show file tree
Hide file tree
Showing 9 changed files with 73 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
strict-peer-dependencies=false
auto-install-peers=false
auto-install-peers=true
ignore-workspace-root-check=true
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ pnpm add use-antd-resizable-header
- **若 column 未传入`dataIndex`,请传入一个唯一的`key`,否则按照将按照 column 的序号 index 计算唯一 key**
- **若 column 有副作用,请把依赖项传入 useMemo deps 中**

## 更新
## Break-Change

- v2.9.0起,不需要再手动引入css样式文件
- 请安装 `use-antd-resizable-header`,而非 `@minko-fe/use-antd-resizable-header`
Expand Down
3 changes: 0 additions & 3 deletions TODO.md

This file was deleted.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
"@types/react-resizable": "^3.0.5",
"@vitest/ui": "^0.34.0",
"antd": "^5.3.0",
"autoprefixer": "^10.4.17",
"bumpp": "^9.0.0",
"conventional-changelog-cli": "^4.1.0",
"eslint": "^8.52.0",
Expand Down
65 changes: 65 additions & 0 deletions pnpm-lock.yaml

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

2 changes: 1 addition & 1 deletion postcss.config.cjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
plugins: [require('postcss-import'), require('postcss-nested')],
plugins: [require('postcss-import'), require('postcss-nested'), require('autoprefixer')],
}
1 change: 1 addition & 0 deletions src/ResizableHeader.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import React from 'react'
import { type FC, type ThHTMLAttributes, memo, useEffect } from 'react'
import { useOverflowDetector } from 'react-detectable-overflow'
import { Resizable, type ResizeCallbackData } from 'react-resizable'
Expand Down
2 changes: 1 addition & 1 deletion src/utils/useLocalColumns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function mergeColumns<T extends any[]>(src: T, target: T, mergeKey: string): T {
const res = src

if (Array.isArray(res) && Array.isArray(target)) {
res.forEach((t?, i?) => {
res.forEach((t, i) => {
if (t?.children) {
mergeColumns(t.children, target[i]?.children, mergeKey)
} else {
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"baseUrl": ".",
"noImplicitAny": false,
"noUnusedLocals": false,
"noUnusedParameters": false
"noUnusedParameters": false,
"jsx": "react"
}
}

0 comments on commit 6bb0115

Please sign in to comment.