-
-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Cascader.Panel support default expand cells #515
Closed
lihongxiangfrontend
wants to merge
31
commits into
react-component:master
from
lihongxiangfrontend:feature/default-expand-cells
Closed
Changes from 30 commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
bf253d7
feat: Cascader.Panel support default expand cells
lihongxiangfrontend f18f6f3
fix: 修复Panel 单测报错
lihongxiangfrontend 99e1125
refactor: panel demo support defaultActiveValueCells
lihongxiangfrontend fdcadbb
fix: remove redundance dependency
lihongxiangfrontend fc2bc36
test: 补齐 Panel multiple with defaultActiveValueCells test suites
lihongxiangfrontend 5966e56
refactor: panel demo add a button for setDefaultActiveValueCells
lihongxiangfrontend cecd044
test: use codecov/codecov-action (#524)
Layouwen b854548
test: use unified github action yml (#528)
Layouwen 6765c25
feat: optimize search (#530)
crazyair a438e92
feat: test (#531)
crazyair a75df6f
3.27.1
zombieJ 7ed02d2
chore: bump tree (#534)
zombieJ 7dc164c
3.28.0
zombieJ ce2e86e
fix: search no scroll (#532)
crazyair 273f613
3.28.1
afc163 2ad949e
Create FUNDING.yml
afc163 e1a0426
fix: antd-issue-51248 (#541)
dongbanban 0d4290e
3.28.2
zombieJ 67cef8a
chore: upgrade deps (#542)
afc163 07f5596
3.29.0
afc163 6c5c1c5
update README
afc163 3f03912
chore: move array-tree-filter to devDeps (#544)
afc163 f0c9f4c
3.29.1
afc163 0b2c795
refactor: Panel 默认展开属性重命名 & 移除在effect中使用 defaultActiveKey
lihongxiangfrontend e83b662
feat: add disabled api for panel (#543)
aojunhao123 be8679f
3.30.0
zombieJ bee7389
feat: Cascader.Panel support default expand cells
lihongxiangfrontend fa3d22e
refactor: panel demo support defaultActiveValueCells
lihongxiangfrontend 7c7f117
refactor: Panel 默认展开属性重命名 & 移除在effect中使用 defaultActiveKey
lihongxiangfrontend 5e15a6c
fix: 删除defaultActiveKey多余声明
lihongxiangfrontend 19823ee
fix: 删除重复声明
lihongxiangfrontend File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# These are supported funding model platforms | ||
|
||
github: ant-design # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] | ||
patreon: # Replace with a single Patreon username | ||
open_collective: ant-design # Replace with a single Open Collective username | ||
ko_fi: # Replace with a single Ko-fi username | ||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel | ||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry | ||
liberapay: # Replace with a single Liberapay username | ||
issuehunt: # Replace with a single IssueHunt username | ||
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry | ||
polar: # Replace with a single Polar username | ||
buy_me_a_coffee: # Replace with a single Buy Me a Coffee username | ||
thanks_dev: # Replace with a single thanks.dev username | ||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,113 +1,6 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
|
||
name: ✅ test | ||
on: [push, pull_request] | ||
jobs: | ||
setup: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@master | ||
|
||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: '16' | ||
|
||
- name: cache package-lock.json | ||
uses: actions/cache@v2 | ||
with: | ||
path: package-temp-dir | ||
key: lock-${{ github.sha }} | ||
|
||
- name: create package-lock.json | ||
run: npm i --package-lock-only | ||
|
||
- name: hack for singe file | ||
run: | | ||
if [ ! -d "package-temp-dir" ]; then | ||
mkdir package-temp-dir | ||
fi | ||
cp package-lock.json package-temp-dir | ||
- name: cache node_modules | ||
id: node_modules_cache_id | ||
uses: actions/cache@v2 | ||
with: | ||
path: node_modules | ||
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} | ||
|
||
- name: install | ||
if: steps.node_modules_cache_id.outputs.cache-hit != 'true' | ||
run: npm ci | ||
|
||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@master | ||
|
||
- name: restore cache from package-lock.json | ||
uses: actions/cache@v2 | ||
with: | ||
path: package-temp-dir | ||
key: lock-${{ github.sha }} | ||
|
||
- name: restore cache from node_modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: node_modules | ||
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} | ||
|
||
- name: lint | ||
run: npm run lint | ||
|
||
needs: setup | ||
|
||
compile: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@master | ||
|
||
- name: restore cache from package-lock.json | ||
uses: actions/cache@v2 | ||
with: | ||
path: package-temp-dir | ||
key: lock-${{ github.sha }} | ||
|
||
- name: restore cache from node_modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: node_modules | ||
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} | ||
|
||
- name: compile | ||
run: npm run compile | ||
|
||
needs: setup | ||
|
||
coverage: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@master | ||
|
||
- name: restore cache from package-lock.json | ||
uses: actions/cache@v2 | ||
with: | ||
path: package-temp-dir | ||
key: lock-${{ github.sha }} | ||
|
||
- name: restore cache from node_modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: node_modules | ||
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} | ||
- name: tsc | ||
run: npm run lint:tsc | ||
- name: coverage | ||
run: npm test -- --coverage && bash <(curl -s https://codecov.io/bash) | ||
|
||
needs: setup | ||
test: | ||
uses: react-component/rc-test/.github/workflows/test.yml@main | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,4 +38,6 @@ coverage | |
.dumi/tmp | ||
.dumi/tmp-production | ||
dist | ||
.vscode | ||
.vscode | ||
|
||
bun.lockb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[install] | ||
peer = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
title: multiple-search | ||
nav: | ||
title: Demo | ||
path: /demo | ||
--- | ||
|
||
<code src="../../examples/multiple-search.tsx"></code> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import React from 'react'; | ||
import '../assets/index.less'; | ||
import Cascader from '../src'; | ||
|
||
const options = [ | ||
{ | ||
value: 'zhejiang', | ||
label: 'Zhejiang', | ||
children: [ | ||
{ | ||
value: 'hangzhou', | ||
label: 'Hangzhou', | ||
children: [ | ||
{ | ||
value: 'xihu', | ||
label: 'West Lake', | ||
}, | ||
{ | ||
value: 'xiasha', | ||
label: 'Xia Sha', | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
{ | ||
value: 'jiangsu', | ||
label: 'Jiangsu', | ||
children: [ | ||
{ | ||
value: 'nanjing', | ||
label: 'Nanjing', | ||
children: [ | ||
{ | ||
value: 'zhonghuamen', | ||
label: 'Zhong Hua men', | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
]; | ||
Comment on lines
+5
to
+42
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion 建议添加类型定义并分离数据
interface CascaderOption {
value: string;
label: string;
children?: CascaderOption[];
}
|
||
|
||
const Demo = () => { | ||
return <Cascader checkable showSearch options={options} />; | ||
}; | ||
|
||
export default Demo; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
建议使用路径别名优化导入语句
当前的相对路径导入方式可能会在项目结构变化时造成维护困难。建议配置 TypeScript 的 path aliases,使用
@
或类似的别名来简化导入路径。例如: