Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
ba5eb75
chore: option of it
zombieJ Jun 21, 2021
ec885a5
chore: multiple
zombieJ Jun 21, 2021
7a9994e
feat: Add active back
zombieJ Jun 22, 2021
3d098b5
chore: Dropdown should place it
zombieJ Jun 22, 2021
69d7fad
chore: Back of customize children
zombieJ Jun 22, 2021
e1bcf9b
feat: Use labelRender
zombieJ Jun 22, 2021
7f13db6
chore: connect value
zombieJ Jun 23, 2021
c2d56e7
feat: Auto open path of select value
zombieJ Jun 23, 2021
6412533
chore: onDropdownChange
zombieJ Jun 23, 2021
7d90850
chore: search open
zombieJ Jun 23, 2021
c3ac760
chore: filter nodes
zombieJ Jun 23, 2021
00bfdf2
chore: ts update
zombieJ Jun 23, 2021
5c5fa40
test: back of test init
zombieJ Aug 18, 2021
5a301d7
feat: Hover trigger
zombieJ Aug 18, 2021
727fb74
fix: changeOnSelect props
zombieJ Aug 18, 2021
8759e1c
test: Control mode
zombieJ Aug 18, 2021
4736910
test: disabled
zombieJ Aug 19, 2021
6484da5
test: disabled
zombieJ Aug 19, 2021
9a2e70a
fix: back of notFoundContent
zombieJ Aug 19, 2021
79ed8ae
chore: Update rc-tree-select
zombieJ Aug 19, 2021
9296a4d
chore: Parse value on first time
zombieJ Aug 19, 2021
cc1f7a0
chore: Internal value parser
zombieJ Aug 19, 2021
c727feb
fix: proxy should keep the nest value as path key
zombieJ Aug 19, 2021
ae5ab7f
fix: hover & selecOnChange logic
zombieJ Aug 20, 2021
037c849
fix: fieldNames match
zombieJ Aug 20, 2021
8f2b4f3
test: for fieldNames
zombieJ Aug 20, 2021
5107971
chore: add warning test
zombieJ Aug 20, 2021
1003459
fix: dbl click should close changeOnSelect
zombieJ Aug 20, 2021
ffafefe
chore: tmp of loadData
zombieJ Aug 20, 2021
a367cee
chore: Back of loadData
zombieJ Aug 23, 2021
8d9abba
fix: empty node isLeaf check logic
zombieJ Aug 23, 2021
3372f2d
test: all pass of index
zombieJ Aug 23, 2021
c490fab
feat: Add filter
zombieJ Aug 23, 2021
2d3cf59
chore: Search on client side
zombieJ Aug 24, 2021
2f3c930
chore: add search.sort func
zombieJ Aug 24, 2021
42ad1b7
test: render of searchConfig
zombieJ Aug 24, 2021
c788ff6
refactor: Move SearchResult into hooks
zombieJ Aug 25, 2021
ef2a48a
chore:key to up & down
zombieJ Aug 25, 2021
357b3d9
chore: simple key navigation
zombieJ Aug 25, 2021
9acba28
chore: rm selected style
zombieJ Aug 25, 2021
cf44e1c
chore: path selection
zombieJ Aug 25, 2021
48fec4f
feat: rtl keyboard
zombieJ Aug 25, 2021
8d431ed
chore: rtl support
zombieJ Aug 25, 2021
d3e82f3
test: update of onKeyDown
zombieJ Aug 25, 2021
63fc4b6
test: rtl test
zombieJ Aug 25, 2021
83e5f17
chore: clean up
zombieJ Aug 25, 2021
acca4f9
test: more coverage
zombieJ Aug 26, 2021
b8edafd
test: more test case
zombieJ Aug 26, 2021
362cd8d
feat: Use checkable instead
zombieJ Aug 26, 2021
fa82de6
test: multiple test case
zombieJ Aug 26, 2021
79b1905
test: 100% coverage
zombieJ Aug 26, 2021
a8d9dab
chore: clean up
zombieJ Aug 26, 2021
cfaa8e0
chore: merge master
zombieJ Aug 26, 2021
aa5c8ca
docs: Update docs
zombieJ Aug 26, 2021
9711e8b
chore: Update comment
zombieJ Aug 26, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ lib
es
yarn.lock
package-lock.json
coverage
# umi
.umi
.umi-production
Expand Down
9 changes: 9 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"endOfLine": "lf",
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "all",
"printWidth": 100,
"arrowParens": "avoid"
}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,13 @@ React.render(
<td>expand current item when click or hover</td>
</tr>
<tr>
<td>popupVisible</td>
<td>open</td>
<td>Boolean</td>
<td></td>
<td>visibility of popup overlay</td>
</tr>
<tr>
<td>onPopupVisibleChange</td>
<td>onDropdownVisibleChange</td>
<td>Function(visible)</td>
<td></td>
<td>callback when popup overlay's visibility changed</td>
Expand Down
168 changes: 2 additions & 166 deletions assets/index.less
Original file line number Diff line number Diff line change
@@ -1,166 +1,2 @@
.effect() {
animation-duration: .3s;
animation-fill-mode: both;
transform-origin: 0 0;
}

.rc-cascader {
font-size: 12px;
&-menus {
font-size: 12px;
overflow: hidden;
background: #fff;
position: absolute;
border: 1px solid #d9d9d9;
border-radius: 6px;
box-shadow: 0 0 4px rgba(0,0,0,0.17);
white-space: nowrap;

&-hidden {
display: none;
}

&.slide-up-enter, &.slide-up-appear {
.effect();
opacity: 0;
animation-timing-function: cubic-bezier(0.08, 0.82, 0.17, 1);
animation-play-state: paused;
}

&.slide-up-leave {
.effect();
opacity: 1;
animation-timing-function: cubic-bezier(0.6, 0.04, 0.98, 0.34);
animation-play-state: paused;
}

&.slide-up-enter.slide-up-enter-active&-placement-bottomLeft,
&.slide-up-appear.slide-up-appear-active&-placement-bottomLeft {
animation-name: SlideUpIn;
animation-play-state: running;
}

&.slide-up-enter.slide-up-enter-active&-placement-topLeft,
&.slide-up-appear.slide-up-appear-active&-placement-topLeft {
animation-name: SlideDownIn;
animation-play-state: running;
}

&.slide-up-leave.slide-up-leave-active&-placement-bottomLeft {
animation-name: SlideUpOut;
animation-play-state: running;
}

&.slide-up-leave.slide-up-leave-active&-placement-topLeft {
animation-name: SlideDownOut;
animation-play-state: running;
}
}
&-menu {
display: inline-block;
width: 100px;
height: 192px;
list-style: none;
margin: 0;
padding: 0;
border-right: 1px solid #e9e9e9;
overflow: auto;
&:last-child {
border-right: 0;
}
}
&-menu-item {
height: 32px;
line-height: 32px;
padding: 0 16px;
cursor: pointer;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
transition: all 0.3s ease;
position: relative;
&:hover {
background: tint(#2db7f5, 90%);
}
&-disabled {
cursor: not-allowed;
color: #ccc;
&:hover {
background: transparent;
}
}
&-loading:after {
position: absolute;
right: 12px;
content: 'loading';
color: #aaa;
font-style: italic;
}
&-active {
background: tint(#2db7f5, 80%);
&:hover {
background: tint(#2db7f5, 80%);
}
}
&-expand {
position: relative;
&-icon {
font-size: 12px;
color: #999;
position: absolute;
right: 16px;
line-height: 32px;
}
}
}
}

@keyframes SlideUpIn {
0% {
opacity: 0;
transform-origin: 0% 0%;
transform: scaleY(.8);
}
100% {
opacity: 1;
transform-origin: 0% 0%;
transform: scaleY(1);
}
}
@keyframes SlideUpOut {
0% {
opacity: 1;
transform-origin: 0% 0%;
transform: scaleY(1);
}
100% {
opacity: 0;
transform-origin: 0% 0%;
transform: scaleY(0.8);
}
}

@keyframes SlideDownIn {
0% {
opacity: 0;
transform-origin: 0% 100%;
transform: scaleY(0.8);
}
100% {
opacity: 1;
transform-origin: 0% 100%;
transform: scaleY(1);
}
}
@keyframes SlideDownOut {
0% {
opacity: 1;
transform-origin: 0% 100%;
transform: scaleY(1);
}
100% {
opacity: 0;
transform-origin: 0% 100%;
transform: scaleY(0.8);
}
}
@import "./select.less";
@import "./list.less";
99 changes: 99 additions & 0 deletions assets/list.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
@select-prefix: ~'rc-cascader';

.@{select-prefix} {
&-dropdown {
min-height: auto;
}

&-holder {
display: flex;
flex-wrap: nowrap;
}

&-menu {
flex: none;
margin: 0;
padding: 0;
list-style: none;
border-left: 1px solid blue;

&:first-child {
border-left: 0;
}

&-item {
display: flex;
flex-wrap: nowrap;
padding-right: 20px;
position: relative;

&-selected {
background: rgba(0, 0, 255, 0.05);
}

&-active {
background: rgba(0, 255, 0, 0.1);
}

&-disabled {
opacity: 0.5;
}



&-content {
flex: auto;
}

&-expand-icon {
position: absolute;
right: 4px;
top: 50%;
transform: translateY(-50%);
}
}
}

&-checkbox {
position: relative;
display: block;
flex: none;
width: 20px;
height: 20px;
border: 1px solid blue;

&::after {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
content: '';
}

&-checked::after {
content: '✔️';
}

&-indeterminate::after {
content: '➖';
}
}

// ====================== RTL ======================
&-rtl {
direction: rtl;

.@{select-prefix}-menu {
flex: none;
margin: 0;
padding: 0;
list-style: none;
border-left: none;
border-right: 1px solid blue;

&:first-child {
border-right: 0;
}
}
}
}
3 changes: 3 additions & 0 deletions assets/select.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@import '~rc-select/assets/index';

@select-prefix: ~'rc-cascader';
3 changes: 3 additions & 0 deletions docs/demo/debug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## debug

<code src="../../examples/debug.tsx">
2 changes: 1 addition & 1 deletion examples/animation.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class Demo extends React.Component {

render() {
return (
<Cascader options={addressOptions} onChange={this.onChange} transitionName="slide-up">
<Cascader options={addressOptions} onChange={this.onChange} animation="slide-up">
<input value={this.state.inputValue} readOnly />
</Cascader>
);
Expand Down
Loading