Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: react-component/cascader
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3.29.0
Choose a base ref
...
head repository: react-component/cascader
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
  • 20 commits
  • 33 files changed
  • 8 contributors

Commits on Oct 22, 2024

  1. update README

    afc163 committed Oct 22, 2024

    Verified

    This commit was created on github.com and signed with GitHub’s verified signature.
    Copy the full SHA
    ecb1459 View commit details
  2. chore: move array-tree-filter to devDeps (#544)

    afc163 authored Oct 22, 2024
    Copy the full SHA
    0cf9a1e View commit details
  3. 3.29.1

    afc163 committed Oct 22, 2024
    Copy the full SHA
    ac5908d View commit details

Commits on Oct 29, 2024

  1. feat: add disabled api for panel (#543)

    * feat: add disabled api for panel
    
    * feat: add test case
    
    * docs: add demo
    
    * fix: test case fixed
    
    * feat: adjust demo position
    
    * feat: improve demo
    
    * chore: reorganize code for better readability
    
    * test: update snapshot
    
    * fix: lint fix
    
    * chore: adjust code structure
    
    * test: update snapshot
    
    * chore: code optimization
    
    ---------
    
    Co-authored-by: 小豪 <aojunhao@cai-inc.com>
    aojunhao123 and 小豪 authored Oct 29, 2024
    Copy the full SHA
    3d53b0f View commit details
  2. 3.30.0

    zombieJ committed Oct 29, 2024
    Copy the full SHA
    751451f View commit details

Commits on Dec 3, 2024

  1. chore: bump rc-tree version to 5.11.0 (#549)

    aojunhao123 authored Dec 3, 2024
    Copy the full SHA
    ca1d26f View commit details
  2. 3.31.0

    zombieJ committed Dec 3, 2024
    Copy the full SHA
    e410bd4 View commit details

Commits on Dec 31, 2024

  1. chore(deps-dev): bump eslint-plugin-jest from 27.9.0 to 28.8.3 (#536)

    Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 27.9.0 to 28.8.3.
    - [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases)
    - [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md)
    - [Commits](jest-community/eslint-plugin-jest@v27.9.0...v28.8.3)
    
    ---
    updated-dependencies:
    - dependency-name: eslint-plugin-jest
      dependency-type: direct:development
      update-type: version-update:semver-major
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Dec 31, 2024
    Copy the full SHA
    edb0ce6 View commit details
  2. chore: update rc-tree (#550)

    li-jia-nan authored Dec 31, 2024
    Copy the full SHA
    a29f464 View commit details
  3. 3.32.0

    afc163 committed Dec 31, 2024
    Copy the full SHA
    078b9b4 View commit details

Commits on Jan 7, 2025

  1. chore: bump rc-tree

    zombieJ committed Jan 7, 2025
    Copy the full SHA
    3f5528d View commit details
  2. 3.33.0

    zombieJ committed Jan 7, 2025
    Copy the full SHA
    4535161 View commit details

Commits on Feb 25, 2025

  1. chore: bump @rc-component deps (#571)

    * chore: bump deps
    
    * test: fix test logic
    
    * test: fix deps
    
    * chore: use npm test
    
    * chore: rm now
    zombieJ authored Feb 25, 2025
    Copy the full SHA
    51a9215 View commit details

Commits on Feb 28, 2025

  1. chore: fix types (#573)

    zombieJ authored Feb 28, 2025
    Copy the full SHA
    3ec671d View commit details
  2. chore: bump version to 1.0.1

    zombieJ committed Feb 28, 2025
    Copy the full SHA
    ee97a7d View commit details

Commits on Mar 6, 2025

  1. feat: retire deprecated api and rename to popup (#558)

    * refactor: update prop names and remove deprecated props
    
    * chore: adjust logic
    
    * chore: remove useless code
    
    * refactor: rename to popup
    
    * chore: change import path
    
    * chore: remove useless test case
    
    * chore: remove compatible logic
    
    * revert
    
    * revert
    
    * refactor: update key logic
    
    * fix: type error
    aojunhao123 authored Mar 6, 2025
    Copy the full SHA
    f16c2a8 View commit details
  2. chore: bump version to 1.1.0

    zombieJ committed Mar 6, 2025
    Copy the full SHA
    e8a8761 View commit details

Commits on Mar 13, 2025

  1. Fix:The dropdown list is not following the highlighted item when navi…

    …gating through the result using up or down arrow after entering keyword (#575)
    
    * fix:cascaderScroll
    
    * fix:cascader
    
    * fix: cascader
    
    * fix: cascader
    
    * fix: cascader
    
    * fix: cascader
    
    * fix: cascader
    
    * fix: cascader
    
    ---------
    
    Co-authored-by: WB01676250 <jl01676250@antgroup.com>
    jin19980928 and WB01676250 authored Mar 13, 2025
    Copy the full SHA
    90f10d1 View commit details
  2. chore: bump version to 1.1.1

    zombieJ committed Mar 13, 2025
    Copy the full SHA
    25bedbd View commit details

Commits on Mar 29, 2025

  1. chore(deps-dev): bump eslint-plugin-unicorn from 52.0.0 to 58.0.0 (#578)

    Bumps [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn) from 52.0.0 to 58.0.0.
    - [Release notes](https://github.com/sindresorhus/eslint-plugin-unicorn/releases)
    - [Commits](sindresorhus/eslint-plugin-unicorn@v52.0.0...v58.0.0)
    
    ---
    updated-dependencies:
    - dependency-name: eslint-plugin-unicorn
      dependency-type: direct:development
      update-type: version-update:semver-major
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Mar 29, 2025
    Copy the full SHA
    beeeb55 View commit details
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -2,5 +2,5 @@ name: ✅ test
on: [push, pull_request]
jobs:
test:
uses: react-component/rc-test/.github/workflows/test.yml@main
uses: react-component/rc-test/.github/workflows/test-npm.yml@main
secrets: inherit
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# rc-cascader

React Cascader Component
React Cascader Component.

[![NPM version][npm-image]][npm-url]
[![npm download][download-image]][download-url]
@@ -54,7 +54,7 @@ $ npm install rc-cascader --save

```js
import React from 'react';
import Cascader from 'rc-cascader';
import Cascader from '@rc-component/cascader';

const options = [{
'label': '福建',
@@ -169,7 +169,7 @@ React.render(
<td>visibility of popup overlay</td>
</tr>
<tr>
<td>onDropdownVisibleChange</td>
<td>onPopupVisibleChange</td>
<td>Function(visible)</td>
<td></td>
<td>callback when popup overlay's visibility changed</td>
@@ -187,7 +187,7 @@ React.render(
<td>prefix className of popup overlay</td>
</tr>
<tr>
<td>dropdownClassName</td>
<td>popupClassName</td>
<td>String</td>
<td></td>
<td>additional className of popup overlay</td>
2 changes: 1 addition & 1 deletion assets/select.less
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@import '~rc-select/assets/index';
@import '~@rc-component/select/assets/index';

@select-prefix: ~'rc-cascader';
8 changes: 0 additions & 8 deletions docs/demo/dropdown-render.md

This file was deleted.

8 changes: 8 additions & 0 deletions docs/demo/popup-render.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: popup-render
nav:
title: Demo
path: /demo
---

<code src="../../examples/popup-render.tsx"></code>
13 changes: 12 additions & 1 deletion examples/panel.tsx
Original file line number Diff line number Diff line change
@@ -61,6 +61,8 @@ export default () => {

const [value2, setValue2] = React.useState<string[][]>([]);

const [disabled, setDisabled] = React.useState(false);

return (
<>
<h1>Panel</h1>
@@ -71,13 +73,21 @@ export default () => {
>
Set Value
</button>
<button
onClick={() => {
setDisabled(prev => !prev);
}}
>
{disabled ? 'enable panel' : 'disable panel'}
</button>
<Cascader.Panel
value={value}
options={addressOptions}
onChange={nextValue => {
console.log('Change:', nextValue);
setValue(nextValue);
}}
disabled={disabled}
/>

<Cascader.Panel
@@ -88,9 +98,10 @@ export default () => {
console.log('Change:', nextValue);
setValue2(nextValue);
}}
disabled={disabled}
/>

<Cascader.Panel options={addressOptions} direction="rtl" />
<Cascader.Panel options={addressOptions} disabled={disabled} direction="rtl" />

<Cascader.Panel notFoundContent="Empty!!!" />
</>
4 changes: 2 additions & 2 deletions examples/dropdown-render.tsx → examples/popup-render.tsx
Original file line number Diff line number Diff line change
@@ -70,11 +70,11 @@ const Demo = () => {
<Cascader
options={addressOptions}
onChange={onChange}
dropdownRender={menus => (
popupRender={menus => (
<div>
{menus}
<hr />
Hey, DropdownRender, Long DropdownRender, Long DropdownRender
Hey, popupRender, Long popupRender, Long popupRender
</div>
)}
>
6 changes: 3 additions & 3 deletions examples/visible.tsx
Original file line number Diff line number Diff line change
@@ -59,7 +59,7 @@ const addressOptions = [

const Demo = () => {
const [value, setValue] = useState<string[]>([]);
const [popupVisible, setPopupVisible] = useState(false);
const [open, setOpen] = useState(false);

const getLabel = () => {
return arrayTreeFilter(addressOptions, (o, level) => o.value === value[level])
@@ -69,10 +69,10 @@ const Demo = () => {

return (
<Cascader
popupVisible={popupVisible}
open={open}
value={value}
options={addressOptions}
onPopupVisibleChange={open => setPopupVisible(open)}
onPopupVisibleChange={open => setOpen(open)}
onChange={value => setValue(value)}
>
<input value={getLabel()} readOnly />
11 changes: 0 additions & 11 deletions now.json

This file was deleted.

35 changes: 18 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rc-cascader",
"version": "3.29.0",
"name": "@rc-component/cascader",
"version": "1.1.1",
"description": "cascade select ui component for react",
"keywords": [
"react",
@@ -33,50 +33,51 @@
"build": "dumi build",
"compile": "father build",
"coverage": "father test --coverage",
"tsc": "bunx tsc --noEmit",
"deploy": "UMI_ENV=gh npm run build && gh-pages -d dist",
"lint": "eslint src/ examples/ --ext .tsx,.ts,.jsx,.jsx",
"now-build": "npm run build",
"prepublishOnly": "npm run compile && np --no-cleanup --yolo --no-publish",
"prepublishOnly": "npm run compile && rc-np",
"lint:tsc": "tsc -p tsconfig.json --noEmit",
"start": "dumi dev",
"test": "rc-test"
},
"dependencies": {
"@babel/runtime": "^7.25.7",
"array-tree-filter": "^2.1.0",
"classnames": "^2.3.1",
"rc-select": "~14.16.2",
"rc-tree": "~5.10.1",
"rc-util": "^5.43.0"
"@rc-component/select": "~1.0.0",
"@rc-component/tree": "~1.0.0",
"@rc-component/util": "^1.2.1",
"classnames": "^2.3.1"
},
"devDependencies": {
"@rc-component/father-plugin": "^1.0.0",
"@rc-component/trigger": "^1.5.0",
"@rc-component/father-plugin": "^2.0.2",
"@rc-component/np": "^1.0.3",
"@rc-component/trigger": "^3.0.0",
"@testing-library/react": "^12.1.5",
"@types/classnames": "^2.2.6",
"@types/enzyme": "^3.1.15",
"@types/jest": "^29.4.0",
"@types/react": "^17.0.38",
"@types/react-dom": "^18.0.11",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@types/warning": "^3.0.0",
"@umijs/fabric": "^4.0.0",
"array-tree-filter": "^3.0.2",
"cheerio": "1.0.0-rc.12",
"core-js": "^3.40.0",
"cross-env": "^7.0.0",
"dumi": "^2.1.10",
"enzyme": "^3.3.0",
"enzyme-adapter-react-16": "^1.15.6",
"enzyme-to-json": "^3.2.1",
"eslint": "^8.54.0",
"eslint-plugin-jest": "^27.6.0",
"eslint-plugin-unicorn": "^52.0.0",
"eslint-plugin-jest": "^28.8.3",
"eslint-plugin-unicorn": "^58.0.0",
"father": "^4.0.0",
"gh-pages": "^6.1.1",
"glob": "^7.1.6",
"less": "^4.2.0",
"np": "^10.0.2",
"prettier": "^3.1.0",
"rc-field-form": "^1.44.0",
"rc-test": "^7.0.14",
"rc-test": "^7.1.2",
"react": "^16.0.0",
"react-dom": "^16.0.0",
"typescript": "^5.3.2"
Loading