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-
61### 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 = {
156156 < span className = { Classes . TREE_NODE_SECONDARY_LABEL } >
157157 < Button
158158 icon = "tick"
159+ ref = { props . submitButtonRef }
159160 { ...( props . submitButtonProps as any ) }
160161 type = "submit"
161162 minimal
Original file line number Diff line number Diff line change @@ -68,11 +68,11 @@ export const TreeItemRenamingInput: React.FC<{
6868 setTitle ( e . target . value ) ;
6969 } ,
7070 onBlur : e => {
71- if ( e . relatedTarget !== submitButtonRef . current ) {
71+ if ( ! e . relatedTarget || e . relatedTarget !== submitButtonRef . current ) {
7272 abort ( ) ;
7373 }
7474 } ,
75- 'aria-label' : 'New item name' , // TODO
75+ 'aria-label' : 'New item name' ,
7676 tabIndex : 0 ,
7777 } ;
7878
You can’t perform that action at this time.
0 commit comments