File tree Expand file tree Collapse file tree 3 files changed +4
-10
lines changed
blueprintjs-renderers/src Expand file tree Collapse file tree 3 files changed +4
-10
lines changed Original file line number Diff line number Diff line change 1
- <!--
2
- ### Breaking Changes
3
-
4
- ### Features
5
-
6
1
### Bug Fixes and Improvements
7
-
8
- ### Other Changes
9
- -->
2
+ - Fixes an issue where not providing a submit button ref in a custom rename input renderer would prevent dismissing the input on blur (#368 )
Original file line number Diff line number Diff line change @@ -156,6 +156,7 @@ export const renderers: TreeRenderProps = {
156
156
< span className = { Classes . TREE_NODE_SECONDARY_LABEL } >
157
157
< Button
158
158
icon = "tick"
159
+ ref = { props . submitButtonRef }
159
160
{ ...( props . submitButtonProps as any ) }
160
161
type = "submit"
161
162
minimal
Original file line number Diff line number Diff line change @@ -68,11 +68,11 @@ export const TreeItemRenamingInput: React.FC<{
68
68
setTitle ( e . target . value ) ;
69
69
} ,
70
70
onBlur : e => {
71
- if ( e . relatedTarget !== submitButtonRef . current ) {
71
+ if ( ! e . relatedTarget || e . relatedTarget !== submitButtonRef . current ) {
72
72
abort ( ) ;
73
73
}
74
74
} ,
75
- 'aria-label' : 'New item name' , // TODO
75
+ 'aria-label' : 'New item name' ,
76
76
tabIndex : 0 ,
77
77
} ;
78
78
You can’t perform that action at this time.
0 commit comments