From 7b8ab75c145109643a70b517d48f7d68d19d4a80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=98=E5=BC=A6?= Date: Tue, 28 Jun 2022 14:03:43 +0800 Subject: [PATCH 01/13] fix(CascaderSelect): filter duplicated non-existent value, close #3921 (#3968) --- src/cascader-select/cascader-select.jsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/cascader-select/cascader-select.jsx b/src/cascader-select/cascader-select.jsx index fd83872d8b..25bbe41687 100644 --- a/src/cascader-select/cascader-select.jsx +++ b/src/cascader-select/cascader-select.jsx @@ -646,6 +646,12 @@ class CascaderSelect extends Component { if (multiple && stateValue && Array.isArray(stateValue)) { const noExistedValues = stateValue.filter(v => !this._v2n[v]); + if (noExistedValues.length > 0) { + value = value.filter(v => { + return !(noExistedValues.indexOf(v) >= 0); + }); + } + value = [...noExistedValues, ...value]; // onChange 中的 data 参数也应该保留不存在的 value 的数据 // 在 dataSource 异步加载的情况下,会出现value重复的现象,需要去重 From b1930b56ff747aed83e3f019711a0fec7cb9f79c Mon Sep 17 00:00:00 2001 From: chenxian Date: Tue, 28 Jun 2022 14:30:26 +0800 Subject: [PATCH 02/13] chore(*): Release-1.25.45 --- CHANGELOG.md | 10 ++++++++++ LATESTLOG.md | 6 ++---- index.js | 2 +- package.json | 2 +- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5efd9d7d8a..99955cbaeb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Change Log +## [1.25.45](https://github.com/alibaba-fusion/next/compare/1.25.44...1.25.45) (2022-06-28) + + +### Bug Fixes + +* **CascaderSelect:** filter duplicated non-existent value, close [#3921](https://github.com/alibaba-fusion/next/issues/3921) ([#3968](https://github.com/alibaba-fusion/next/issues/3968)) ([7b8ab75](https://github.com/alibaba-fusion/next/commit/7b8ab75)) + + + + ## [1.25.44](https://github.com/alibaba-fusion/next/compare/1.25.43...1.25.44) (2022-06-21) diff --git a/LATESTLOG.md b/LATESTLOG.md index 4a07ec7922..18236e05b6 100644 --- a/LATESTLOG.md +++ b/LATESTLOG.md @@ -1,12 +1,10 @@ # Latest Log -## [1.25.44](https://github.com/alibaba-fusion/next/compare/1.25.43...1.25.44) (2022-06-21) +## [1.25.45](https://github.com/alibaba-fusion/next/compare/1.25.44...1.25.45) (2022-06-28) ### Bug Fixes -* **Table:** table d.ts add wordBreak props ([#3960](https://github.com/alibaba-fusion/next/issues/3960)) ([5163641](https://github.com/alibaba-fusion/next/commit/5163641)) -* **Tree:** not calculate all checked value when checkedStrategy is child ([#3961](https://github.com/alibaba-fusion/next/issues/3961)) ([5e2c577](https://github.com/alibaba-fusion/next/commit/5e2c577)) -* **TreeSelect:** support turn off local filter, close [#3939](https://github.com/alibaba-fusion/next/issues/3939) ([#3959](https://github.com/alibaba-fusion/next/issues/3959)) ([6f6b3f1](https://github.com/alibaba-fusion/next/commit/6f6b3f1)) +* **CascaderSelect:** filter duplicated non-existent value, close [#3921](https://github.com/alibaba-fusion/next/issues/3921) ([#3968](https://github.com/alibaba-fusion/next/issues/3968)) ([7b8ab75](https://github.com/alibaba-fusion/next/commit/7b8ab75)) diff --git a/index.js b/index.js index b728d68d65..9c16c25580 100644 --- a/index.js +++ b/index.js @@ -1,5 +1,5 @@ var next = require('./lib/index.js'); -next.version = '1.25.44'; +next.version = '1.25.45'; module.exports = next; diff --git a/package.json b/package.json index ab18395730..97f65258db 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@alifd/next", - "version": "1.25.44", + "version": "1.25.45", "description": "A configurable component library for web built on React.", "keywords": [ "fusion", From 7438bff4fafa9f21a5101e79ee81436013a044f1 Mon Sep 17 00:00:00 2001 From: chenxian Date: Mon, 25 Jul 2022 11:42:48 +0800 Subject: [PATCH 03/13] fix(*): fix sass build error --- src/grid/scss/mixin.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/grid/scss/mixin.scss b/src/grid/scss/mixin.scss index 2b958ddbf4..289110c9c6 100755 --- a/src/grid/scss/mixin.scss +++ b/src/grid/scss/mixin.scss @@ -19,7 +19,7 @@ @if ($name == 'xl') { $query: $minQuery; } @else { - $query: $minQuery + "and" + $maxQuery; + $query: $minQuery + " and " + $maxQuery; } @media #{$query} { @content; } } From 197620856027b82cfc1e6e5d3d4a882527c9fd21 Mon Sep 17 00:00:00 2001 From: chenxian Date: Mon, 25 Jul 2022 14:14:33 +0800 Subject: [PATCH 04/13] chore(*): Release-1.25.46 --- CHANGELOG.md | 10 ++++++++++ LATESTLOG.md | 4 ++-- index.js | 2 +- package.json | 2 +- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 99955cbaeb..52ff1a871a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Change Log +## [1.25.46](https://github.com/alibaba-fusion/next/compare/1.25.45...1.25.46) (2022-07-25) + + +### Bug Fixes + +* fix sass build error ([7438bff](https://github.com/alibaba-fusion/next/commit/7438bff)) + + + + ## [1.25.45](https://github.com/alibaba-fusion/next/compare/1.25.44...1.25.45) (2022-06-28) diff --git a/LATESTLOG.md b/LATESTLOG.md index 18236e05b6..34727a41d7 100644 --- a/LATESTLOG.md +++ b/LATESTLOG.md @@ -1,10 +1,10 @@ # Latest Log -## [1.25.45](https://github.com/alibaba-fusion/next/compare/1.25.44...1.25.45) (2022-06-28) +## [1.25.46](https://github.com/alibaba-fusion/next/compare/1.25.45...1.25.46) (2022-07-25) ### Bug Fixes -* **CascaderSelect:** filter duplicated non-existent value, close [#3921](https://github.com/alibaba-fusion/next/issues/3921) ([#3968](https://github.com/alibaba-fusion/next/issues/3968)) ([7b8ab75](https://github.com/alibaba-fusion/next/commit/7b8ab75)) +* fix sass build error ([7438bff](https://github.com/alibaba-fusion/next/commit/7438bff)) diff --git a/index.js b/index.js index 9c16c25580..1e366ddc6a 100644 --- a/index.js +++ b/index.js @@ -1,5 +1,5 @@ var next = require('./lib/index.js'); -next.version = '1.25.45'; +next.version = '1.25.46'; module.exports = next; diff --git a/package.json b/package.json index 97f65258db..2b98245e07 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@alifd/next", - "version": "1.25.45", + "version": "1.25.46", "description": "A configurable component library for web built on React.", "keywords": [ "fusion", From 8108be11296e39452976a4b0f0c2ca26976adfe9 Mon Sep 17 00:00:00 2001 From: Just <898617222@163.com> Date: Mon, 25 Jul 2022 17:48:26 +0800 Subject: [PATCH 05/13] docs(Icon): optimize ui style of docs when font_class is too long (#4014) Co-authored-by: justquanyin <8986172222@163.com> --- docs/icon/demo/type.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/icon/demo/type.md b/docs/icon/demo/type.md index d014fa3b2e..486cfff03d 100644 --- a/docs/icon/demo/type.md +++ b/docs/icon/demo/type.md @@ -114,6 +114,9 @@ ReactDOM.render( margin-top: 10px; text-align: center; font-size: 14px; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; } .icon-list-custom-title { From 7a86713198249163223ba891bcd6a6b30cfbe48f Mon Sep 17 00:00:00 2001 From: chenxian Date: Mon, 25 Jul 2022 18:27:44 +0800 Subject: [PATCH 06/13] fix(Tree): fix select-all bug on parent node when treeCheckedStrategy set as "child", close #3984, #3936 --- src/tree-select/tree-select.jsx | 5 +---- src/tree/view/tree.jsx | 7 ++----- src/tree/view/util.js | 10 +++++++++- test/tree-select/index-spec.js | 16 ++++++++++++++++ 4 files changed, 28 insertions(+), 10 deletions(-) diff --git a/src/tree-select/tree-select.jsx b/src/tree-select/tree-select.jsx index 0c19c26b1d..f19680ee80 100644 --- a/src/tree-select/tree-select.jsx +++ b/src/tree-select/tree-select.jsx @@ -433,10 +433,7 @@ class TreeSelect extends Component { let keys = this.getKeysByValue(value); - if (treeCheckedStrategy !== 'child') { - // there's no need to calculate all checked value when treeCheckedStrategy=child, close #3936 - keys = getAllCheckedKeys(keys, this.state._k2n, this.state._p2n); - } + keys = getAllCheckedKeys(keys, this.state._k2n, this.state._p2n); switch (treeCheckedStrategy) { case 'parent': diff --git a/src/tree/view/tree.jsx b/src/tree/view/tree.jsx index 3e64921eba..64373d8b91 100644 --- a/src/tree/view/tree.jsx +++ b/src/tree/view/tree.jsx @@ -130,7 +130,7 @@ const getCheckedKeys = (props, willReceiveProps, _k2n, _p2n) => { checkedKeys = []; } - const { checkStrictly, checkedStrategy } = props; // TODO TEST + const { checkStrictly } = props; // TODO TEST if (checkStrictly) { if (isPlainObject(checkedKeys)) { const { checked, indeterminate } = checkedKeys; @@ -142,10 +142,7 @@ const getCheckedKeys = (props, willReceiveProps, _k2n, _p2n) => { checkedKeys = checkedKeys.filter(key => !!_k2n[key]); } else { - if (checkedStrategy !== 'child') { - // checkedStrategy 为 child 时不需要计算所有可选值 - checkedKeys = getAllCheckedKeys(checkedKeys, _k2n, _p2n); - } + checkedKeys = getAllCheckedKeys(checkedKeys, _k2n, _p2n); checkedKeys = checkedKeys.filter(key => !!_k2n[key]); diff --git a/src/tree/view/util.js b/src/tree/view/util.js index b2e52fd24b..f73ca02bd3 100644 --- a/src/tree/view/util.js +++ b/src/tree/view/util.js @@ -163,7 +163,15 @@ export function getAllCheckedKeys(checkedKeys, _k2n, _p2n) { const parent = _p2n[parentPos]; if (parent.checkable === false || parent.disabled || parent.checkboxDisabled) continue; const parentChecked = parent.children.every(child => isNodeChecked(child, flatKeys)); - if (parentChecked) { + + const isAllChildrenDisabled = parent.children.every(child => { + return child.disabled; + }); + + // don't auto select parent when all children are disabled, + // fix https://github.com/alibaba-fusion/next/issues/3936 + + if (parentChecked && !isAllChildrenDisabled) { parent.children.forEach(removeKey); addParentKey(i, parent); } else { diff --git a/test/tree-select/index-spec.js b/test/tree-select/index-spec.js index bdeabe3155..0a7360bf99 100644 --- a/test/tree-select/index-spec.js +++ b/test/tree-select/index-spec.js @@ -356,6 +356,22 @@ describe('TreeSelect', () => { assert.deepEqual(getLabels(wrapper), ['test1']); }); + it('should set parent node checked if all child nodes is checked even treeCheckedStrategy is "child"', () => { + wrapper = mount( + + ) + + assertChecked('3', true); + }) + it('should render parent tag when set treeCheckedStrategy to all', () => { wrapper = mount( Date: Mon, 25 Jul 2022 18:28:17 +0800 Subject: [PATCH 07/13] chore(*): set commit message max-length as 120 --- .commitlintrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.commitlintrc b/.commitlintrc index b688848f49..3a993f6b54 100644 --- a/.commitlintrc +++ b/.commitlintrc @@ -1,6 +1,6 @@ { "rules": { - "header-max-length": [2, "always", 90], + "header-max-length": [2, "always", 120], "scope-empty": [2, "never"], "scope-case": [2, "always", "pascal-case"], "subject-empty": [2, "never"], From a8e07e3816b7c754d420d9072829784aa4b96aa1 Mon Sep 17 00:00:00 2001 From: chenxian Date: Tue, 26 Jul 2022 14:34:46 +0800 Subject: [PATCH 08/13] chore(*): Release-1.25.47 --- CHANGELOG.md | 10 ++++++++++ LATESTLOG.md | 4 ++-- index.js | 2 +- package.json | 2 +- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 52ff1a871a..1928a89d6a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Change Log +## [1.25.47](https://github.com/alibaba-fusion/next/compare/1.25.46...1.25.47) (2022-07-26) + + +### Bug Fixes + +* **Tree:** fix select-all bug on parent node when treeCheckedStrategy set as "child", close [#3984](https://github.com/alibaba-fusion/next/issues/3984), [#3936](https://github.com/alibaba-fusion/next/issues/3936) ([7a86713](https://github.com/alibaba-fusion/next/commit/7a86713)) + + + + ## [1.25.46](https://github.com/alibaba-fusion/next/compare/1.25.45...1.25.46) (2022-07-25) diff --git a/LATESTLOG.md b/LATESTLOG.md index 34727a41d7..90e039df77 100644 --- a/LATESTLOG.md +++ b/LATESTLOG.md @@ -1,10 +1,10 @@ # Latest Log -## [1.25.46](https://github.com/alibaba-fusion/next/compare/1.25.45...1.25.46) (2022-07-25) +## [1.25.47](https://github.com/alibaba-fusion/next/compare/1.25.46...1.25.47) (2022-07-26) ### Bug Fixes -* fix sass build error ([7438bff](https://github.com/alibaba-fusion/next/commit/7438bff)) +* **Tree:** fix select-all bug on parent node when treeCheckedStrategy set as "child", close [#3984](https://github.com/alibaba-fusion/next/issues/3984), [#3936](https://github.com/alibaba-fusion/next/issues/3936) ([7a86713](https://github.com/alibaba-fusion/next/commit/7a86713)) diff --git a/index.js b/index.js index 1e366ddc6a..e5c8512d04 100644 --- a/index.js +++ b/index.js @@ -1,5 +1,5 @@ var next = require('./lib/index.js'); -next.version = '1.25.46'; +next.version = '1.25.47'; module.exports = next; diff --git a/package.json b/package.json index 2b98245e07..863509b8c2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@alifd/next", - "version": "1.25.46", + "version": "1.25.47", "description": "A configurable component library for web built on React.", "keywords": [ "fusion", From e9c361fc0c77c8fa047ba1198e43a7f3b7a8a40d Mon Sep 17 00:00:00 2001 From: bindoon Date: Wed, 27 Jul 2022 09:42:59 +0800 Subject: [PATCH 09/13] fix(NumberPicker): ignore input not in -.\d fix #3363, #3916 --- src/number-picker/number-picker.jsx | 3 +++ test/number-picker/index-spec.js | 16 ++++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/number-picker/number-picker.jsx b/src/number-picker/number-picker.jsx index c33491fd48..e53eff2e8d 100644 --- a/src/number-picker/number-picker.jsx +++ b/src/number-picker/number-picker.jsx @@ -320,6 +320,9 @@ class NumberPicker extends React.Component { onChange(value, e) { // ignore space & Compatible Chinese Input Method value = value.replace('。', '.').trim(); + // 过滤非数字 + value = value.replace(/[^-.\d]/g, ''); + let onlyDisplay = false; if (this.props.editable === true && this.shouldFireOnChange(value)) { let valueCorrected = this.correctValue(value); diff --git a/test/number-picker/index-spec.js b/test/number-picker/index-spec.js index 466f2f19c2..ea9c7c4de2 100644 --- a/test/number-picker/index-spec.js +++ b/test/number-picker/index-spec.js @@ -127,7 +127,7 @@ describe('number-picker', () => { wrapper .find('input') .simulate('change', { target: { value: `${Number.MAX_SAFE_INTEGER}a2333` } }); - assert(wrapper.find('input').prop('value') === `${Number.MAX_SAFE_INTEGER}a2333`); + assert(wrapper.find('input').prop('value') === `${Number.MAX_SAFE_INTEGER}2333`); wrapper.find('input').simulate('blur'); assert(wrapper.find('input').prop('value') === `${Number.MAX_SAFE_INTEGER}2333`); wrapper @@ -148,7 +148,7 @@ describe('number-picker', () => { wrapper2 .find('input') .simulate('change', { target: { value: `${Number.MAX_SAFE_INTEGER}a2333` } }); - assert(wrapper2.find('input').prop('value') === `${Number.MAX_SAFE_INTEGER}a2333`); + assert(wrapper2.find('input').prop('value') === `${Number.MAX_SAFE_INTEGER}2333`); wrapper2.find('input').simulate('blur'); assert(wrapper2.find('input').prop('value') === `${Number.MAX_SAFE_INTEGER}2333`); wrapper2 @@ -322,6 +322,18 @@ describe('number-picker', () => { done(); }); + it('should only input -.1234567890', () => { + let wrapper = mount( + + ); + wrapper.find('input').simulate('change', { target: { value: '-1.' } }); + assert(wrapper.find('input').prop('value') === "-1."); + wrapper.find('input').simulate('change', { target: { value: '-1.a' } }); + assert(wrapper.find('input').prop('value') === "-1."); + wrapper.find('input').simulate('change', { target: { value: '-1.13a2' } }); + assert(wrapper.find('input').prop('value') === "-1.132"); + }) + it('onChange value 1.9 -> 1. should input displayValue === 1. onchange value === 1', done => { const onChange = (value) => { assert(value === 1) From e2371e045724109ee5b2b10b12ddf24a45db63b5 Mon Sep 17 00:00:00 2001 From: bindoon Date: Thu, 28 Jul 2022 09:26:58 +0800 Subject: [PATCH 10/13] fix(NumberPicker): should not input bigger then max fix #4002 --- src/number-picker/number-picker.jsx | 26 +++++++++++++++++--------- test/number-picker/index-spec.js | 16 +++++++++++++--- 2 files changed, 30 insertions(+), 12 deletions(-) diff --git a/src/number-picker/number-picker.jsx b/src/number-picker/number-picker.jsx index e53eff2e8d..04b930a09a 100644 --- a/src/number-picker/number-picker.jsx +++ b/src/number-picker/number-picker.jsx @@ -266,12 +266,7 @@ class NumberPicker extends React.Component { const displayValue = `${this.state.displayValue}`; // 展示值合法但超出边界时,额外在Blur时触发onChange // 展示值非法时,回退前一个有效值 - if ( - editable === true && - !isNaN(displayValue) && - !this.shouldFireOnChange(displayValue) && - !this.withinMinMax(displayValue) - ) { + if (editable === true && !isNaN(displayValue) && !this.withinMinMax(displayValue)) { let valueCorrected = this.correctValue(displayValue); valueCorrected = stringMode ? BigNumber(valueCorrected).toFixed(this.getPrecision()) : valueCorrected; if (this.state.value !== valueCorrected) { @@ -293,6 +288,12 @@ class NumberPicker extends React.Component { return true; } + withinMin(value) { + const { min } = this.state; + if (isNaN(value) || this.isGreaterThan(min, value)) return false; + return true; + } + setDisplayValue({ displayValue, onlyDisplay = false }) { this.setState({ displayValue, onlyDisplay }); } @@ -309,9 +310,13 @@ class NumberPicker extends React.Component { : displayValue; } + /** + * 输入时判断是否要触发onChange + * 正常触发: 合法数字 (eg: -0 -0. 0.1);超出最大值 + * 不触发: 1. 非数字(eg: - ), 2. 小于最小值(输入需要过程由小变大) + */ shouldFireOnChange(value) { - // 不触发onChange:a.非数字 b.超出边界的数字输入 - if (isNaN(value) || !this.withinMinMax(value)) { + if (isNaN(value) || !this.withinMin(value)) { return false; } return true; @@ -325,10 +330,13 @@ class NumberPicker extends React.Component { let onlyDisplay = false; if (this.props.editable === true && this.shouldFireOnChange(value)) { - let valueCorrected = this.correctValue(value); + const valueCorrected = this.correctValue(value); if (this.state.value !== valueCorrected) { this.setValue({ value: valueCorrected, e }); } + if (typeof this.props.max !== 'undefined' && this.isGreaterThan(value, this.state.max)) { + value = String(valueCorrected); + } } else { onlyDisplay = true; } diff --git a/test/number-picker/index-spec.js b/test/number-picker/index-spec.js index ea9c7c4de2..66bed04b35 100644 --- a/test/number-picker/index-spec.js +++ b/test/number-picker/index-spec.js @@ -332,8 +332,8 @@ describe('number-picker', () => { assert(wrapper.find('input').prop('value') === "-1."); wrapper.find('input').simulate('change', { target: { value: '-1.13a2' } }); assert(wrapper.find('input').prop('value') === "-1.132"); - }) - + }); + it('onChange value 1.9 -> 1. should input displayValue === 1. onchange value === 1', done => { const onChange = (value) => { assert(value === 1) @@ -981,7 +981,17 @@ describe('number-picker', () => { .at(1) .simulate('click'); }); - + + it('should not input number large then max', () => { + let wrapper = mount( + + ); + wrapper.find('input').simulate('change', { target: { value: '100' } }); + assert(wrapper.find('input').prop('value') === "10"); + wrapper.find('input').simulate('change', { target: { value: '5' } }); + assert(wrapper.find('input').prop('value') === "5"); + }); + it('should support precision', done => { const wrapper = mount( From c879a5234e20dfa8c369aaeeb2032313c43779de Mon Sep 17 00:00:00 2001 From: chenxian Date: Fri, 22 Jul 2022 15:05:04 +0800 Subject: [PATCH 11/13] fix(Select): auto close popup when item get clicked, close #4004 --- src/select/select.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/select/select.jsx b/src/select/select.jsx index 2740a0af96..a117ba9d2d 100644 --- a/src/select/select.jsx +++ b/src/select/select.jsx @@ -430,7 +430,8 @@ class Select extends Base { this.focusInput(); } - if (this.props.mode === 'single' && key === this.state.value) { + // key is string type here, fix https://github.com/alibaba-fusion/next/issues/4004 + if (this.props.mode === 'single' && key === String(this.state.value)) { this.setVisible(false, 'itemClick'); } } From 09ea83ebe3aa62f7d85b8acf72fb8e803aceecef Mon Sep 17 00:00:00 2001 From: weinanyang <90443688+weinianyang@users.noreply.github.com> Date: Thu, 28 Jul 2022 15:01:12 +0800 Subject: [PATCH 12/13] fix(Table): table tree if without children should icon type equal, close #4009 (#4022) --- src/table/main.scss | 6 ++++-- src/table/tree/cell.jsx | 36 ++++++------------------------------ 2 files changed, 10 insertions(+), 32 deletions(-) diff --git a/src/table/main.scss b/src/table/main.scss index 6c6c047bc5..e80a5f6501 100644 --- a/src/table/main.scss +++ b/src/table/main.scss @@ -313,8 +313,10 @@ } } &-tree-placeholder { - display: inline-block; - width: 12px; + @include icon-size($table-tree-expanded-icon-size); + visibility: hidden; + // display: inline-block; + // width: 12px; } } diff --git a/src/table/tree/cell.jsx b/src/table/tree/cell.jsx index e06cd156b8..996b563390 100644 --- a/src/table/tree/cell.jsx +++ b/src/table/tree/cell.jsx @@ -40,21 +40,8 @@ export default class TreeCell extends React.Component { }; render() { - const { - colIndex, - record, - prefix, - primaryKey, - locale, - rtl, - children, - } = this.props; - const { - openTreeRowKeys: openRowKeys, - indent, - isTree, - rowSelection, - } = this.context; + const { colIndex, record, prefix, primaryKey, locale, rtl, children } = this.props; + const { openTreeRowKeys: openRowKeys, indent, isTree, rowSelection } = this.context; const treeArrowNodeIndex = rowSelection ? 1 : 0; let firstCellStyle, treeArrowNode; if (colIndex === treeArrowNodeIndex) { @@ -65,15 +52,10 @@ export default class TreeCell extends React.Component { [paddingType]: indent * (record.__level + 1), }; treeArrowNode = ( - + ); if (record.children && record.children.length) { - const hasExpanded = - openRowKeys.indexOf(record[primaryKey]) > -1; + const hasExpanded = openRowKeys.indexOf(record[primaryKey]) > -1; treeArrowType = hasExpanded ? 'arrow-down' : 'arrow-right'; @@ -88,20 +70,14 @@ export default class TreeCell extends React.Component { role="button" tabIndex="0" aria-expanded={hasExpanded} - aria-label={ - hasExpanded ? locale.expanded : locale.folded - } + aria-label={hasExpanded ? locale.expanded : locale.folded} /> ); } } } return ( - + {children} {treeArrowNode} From 8d49599c69ac8aaae85276d4d119b7f6f66357de Mon Sep 17 00:00:00 2001 From: chenxian Date: Thu, 28 Jul 2022 15:06:43 +0800 Subject: [PATCH 13/13] chore(*): Release-1.25.48 --- CHANGELOG.md | 13 +++++++++++++ LATESTLOG.md | 7 +++++-- index.js | 2 +- package.json | 2 +- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1928a89d6a..19f8312de5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Change Log +## [1.25.48](https://github.com/alibaba-fusion/next/compare/1.25.47...1.25.48) (2022-07-28) + + +### Bug Fixes + +* **NumberPicker:** ignore input not in -.\d fix [#3363](https://github.com/alibaba-fusion/next/issues/3363), [#3916](https://github.com/alibaba-fusion/next/issues/3916) ([e9c361f](https://github.com/alibaba-fusion/next/commit/e9c361f)) +* **NumberPicker:** should not input bigger then max fix [#4002](https://github.com/alibaba-fusion/next/issues/4002) ([e2371e0](https://github.com/alibaba-fusion/next/commit/e2371e0)) +* **Select:** auto close popup when item get clicked, close [#4004](https://github.com/alibaba-fusion/next/issues/4004) ([c879a52](https://github.com/alibaba-fusion/next/commit/c879a52)) +* **Table:** table tree if without children should icon type equal, close [#4009](https://github.com/alibaba-fusion/next/issues/4009) ([#4022](https://github.com/alibaba-fusion/next/issues/4022)) ([09ea83e](https://github.com/alibaba-fusion/next/commit/09ea83e)) + + + + ## [1.25.47](https://github.com/alibaba-fusion/next/compare/1.25.46...1.25.47) (2022-07-26) diff --git a/LATESTLOG.md b/LATESTLOG.md index 90e039df77..9a8a9c56b7 100644 --- a/LATESTLOG.md +++ b/LATESTLOG.md @@ -1,10 +1,13 @@ # Latest Log -## [1.25.47](https://github.com/alibaba-fusion/next/compare/1.25.46...1.25.47) (2022-07-26) +## [1.25.48](https://github.com/alibaba-fusion/next/compare/1.25.47...1.25.48) (2022-07-28) ### Bug Fixes -* **Tree:** fix select-all bug on parent node when treeCheckedStrategy set as "child", close [#3984](https://github.com/alibaba-fusion/next/issues/3984), [#3936](https://github.com/alibaba-fusion/next/issues/3936) ([7a86713](https://github.com/alibaba-fusion/next/commit/7a86713)) +* **NumberPicker:** ignore input not in -.\d fix [#3363](https://github.com/alibaba-fusion/next/issues/3363), [#3916](https://github.com/alibaba-fusion/next/issues/3916) ([e9c361f](https://github.com/alibaba-fusion/next/commit/e9c361f)) +* **NumberPicker:** should not input bigger then max fix [#4002](https://github.com/alibaba-fusion/next/issues/4002) ([e2371e0](https://github.com/alibaba-fusion/next/commit/e2371e0)) +* **Select:** auto close popup when item get clicked, close [#4004](https://github.com/alibaba-fusion/next/issues/4004) ([c879a52](https://github.com/alibaba-fusion/next/commit/c879a52)) +* **Table:** table tree if without children should icon type equal, close [#4009](https://github.com/alibaba-fusion/next/issues/4009) ([#4022](https://github.com/alibaba-fusion/next/issues/4022)) ([09ea83e](https://github.com/alibaba-fusion/next/commit/09ea83e)) diff --git a/index.js b/index.js index e5c8512d04..9152a17712 100644 --- a/index.js +++ b/index.js @@ -1,5 +1,5 @@ var next = require('./lib/index.js'); -next.version = '1.25.47'; +next.version = '1.25.48'; module.exports = next; diff --git a/package.json b/package.json index 863509b8c2..5b15cf30f8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@alifd/next", - "version": "1.25.47", + "version": "1.25.48", "description": "A configurable component library for web built on React.", "keywords": [ "fusion",