uxcore-tree-select
Advanced tools
@@ -564,2 +564,3 @@ 'use strict'; | ||
| } | ||
| // when prop multiple is true,show right dropdown | ||
| var popupElement = _react2["default"].createElement( | ||
@@ -572,11 +573,11 @@ 'div', | ||
| 'div', | ||
| { className: dropdownPrefixCls + '-left' }, | ||
| { className: multiple ? dropdownPrefixCls + '-left' : dropdownPrefixCls + '-all' }, | ||
| search, | ||
| notFoundContent || this.renderTree(keys, halfCheckedKeys, treeNodes, multiple) | ||
| ), | ||
| this.renderRightDropdown(rightTreeNodes, keys) | ||
| multiple && this.renderRightDropdown(rightTreeNodes, keys) | ||
| ); | ||
| var popupStyle = {}; | ||
| popupStyle['width'] = props.dropdownMatchSelectWidth ? this.state.dropdownWidth + 'px' : '350px'; | ||
| popupStyle['width'] = props.dropdownMatchSelectWidth || !multiple ? this.state.dropdownWidth + 'px' : '350px'; | ||
@@ -583,0 +584,0 @@ popupStyle = _extends({}, popupStyle, props.dropdownStyle); |
@@ -652,3 +652,16 @@ /** | ||
| } | ||
| .@{__treeSelectPrefixCls}-dropdown-all { | ||
| background-color: white; | ||
| border: 1px solid #dcdcdc; | ||
| border-radius: @input-border-radius 0 0 @input-border-radius; | ||
| box-sizing: border-box; | ||
| display: inline-block; | ||
| vertical-align: middle; | ||
| width: 100%; | ||
| height: 100%; | ||
| overflow-y: auto; | ||
| height: 100%; | ||
| } | ||
| .@{__treeSelectPrefixCls}-dropdown-right { | ||
@@ -655,0 +668,0 @@ border-left-color: transparent; |
@@ -103,4 +103,3 @@ /** | ||
| style={{ width: 300 }} | ||
| dropdownMatchSelectWidth={false} | ||
| dropdownStyle={{ width: '500px' }} | ||
| // dropdownStyle={{ width: '500px' }} | ||
| placeholder={<i>请下拉选择</i>} | ||
@@ -172,3 +171,3 @@ searchPlaceholder="please search" | ||
| locale="en-us" | ||
| // labelInValue={true} | ||
| labelInValue={true} | ||
| treeCheckable={true} | ||
@@ -175,0 +174,0 @@ /> |
+6
-0
| # HISTORY | ||
| --- | ||
| ## 0.4.19 | ||
| * `FEATURE` do not show rightDropdown when prop multiple is false | ||
| ## 0.4.18 | ||
| * `FEATURE` theeSelectNode remove style overflow | ||
| ## 0.4.17 | ||
@@ -5,0 +11,0 @@ * `UPDATE` rc-tree update to support customize treeNode icon && add size props |
+1
-1
| { | ||
| "name": "uxcore-tree-select", | ||
| "version": "0.4.18", | ||
| "version": "0.4.20", | ||
| "description": "uxcore-tree-select component for uxcore.", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/uxcore/uxcore-tree-select.git", |
@@ -507,2 +507,3 @@ // customized rc-tree-select https://github.com/react-component/tree-select/blob/master/src/SelectTrigger.jsx | ||
| } | ||
| // when prop multiple is true,show right dropdown | ||
| const popupElement = ( | ||
@@ -512,7 +513,7 @@ <div | ||
| > | ||
| <div className={`${dropdownPrefixCls}-left`}> | ||
| <div className={multiple ? `${dropdownPrefixCls}-left` : `${dropdownPrefixCls}-all`}> | ||
| {search} | ||
| {notFoundContent || this.renderTree(keys, halfCheckedKeys, treeNodes, multiple)} | ||
| </div> | ||
| {this.renderRightDropdown(rightTreeNodes, keys)} | ||
| {multiple && this.renderRightDropdown(rightTreeNodes, keys)} | ||
| </div> | ||
@@ -522,3 +523,3 @@ ); | ||
| let popupStyle = {}; | ||
| popupStyle['width'] = props.dropdownMatchSelectWidth ? `${this.state.dropdownWidth}px` : '350px'; | ||
| popupStyle['width'] = (props.dropdownMatchSelectWidth || !multiple) ? `${this.state.dropdownWidth}px` : '350px'; | ||
@@ -525,0 +526,0 @@ popupStyle = { ...popupStyle, ...props.dropdownStyle }; |
+13
-0
@@ -652,3 +652,16 @@ /** | ||
| } | ||
| .@{__treeSelectPrefixCls}-dropdown-all { | ||
| background-color: white; | ||
| border: 1px solid #dcdcdc; | ||
| border-radius: @input-border-radius 0 0 @input-border-radius; | ||
| box-sizing: border-box; | ||
| display: inline-block; | ||
| vertical-align: middle; | ||
| width: 100%; | ||
| height: 100%; | ||
| overflow-y: auto; | ||
| height: 100%; | ||
| } | ||
| .@{__treeSelectPrefixCls}-dropdown-right { | ||
@@ -655,0 +668,0 @@ border-left-color: transparent; |
@@ -22,2 +22,13 @@ import React from 'react'; | ||
| ]; | ||
| it('single select have no right tree', () => { | ||
| const wrapper = mount( | ||
| <TreeSelect | ||
| treeData={treeData} | ||
| resultsPanelTitle="haha" | ||
| open | ||
| /> | ||
| ); | ||
| const trigger = mount(wrapper.find('Trigger').props().popup); | ||
| expect(trigger.find('.uxcore-tree-select-dropdown-right-title').length).to.equal(0); | ||
| }); | ||
@@ -27,2 +38,3 @@ it('render title', () => { | ||
| <TreeSelect | ||
| multiple | ||
| treeData={treeData} | ||
@@ -40,2 +52,3 @@ resultsPanelTitle="haha" | ||
| <TreeSelect | ||
| multiple | ||
| defaultValue={['a', 'b']} | ||
@@ -56,2 +69,3 @@ treeData={treeData} | ||
| treeData={treeData2} | ||
| multiple | ||
| resultsPanelTitle="haha" | ||
@@ -85,2 +99,3 @@ open | ||
| treeData={treeData} | ||
| multiple | ||
| resultsPanelTitle="haha" | ||
@@ -98,2 +113,3 @@ open | ||
| <TreeSelect | ||
| multiple | ||
| defaultValue={['a', 'b']} | ||
@@ -100,0 +116,0 @@ treeData={treeData} |
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
228682
0.63%4644
0.37%