@@ -29,9 +29,15 @@ export default class TreeTitle extends PureComponent<{
2929 title : string ;
3030 condition ?: boolean ;
3131 visible ?: boolean ;
32+ filterWorking : boolean ;
33+ keywords : string ;
34+ matchSelf : boolean ;
3235 } = {
3336 editing : false ,
3437 title : '' ,
38+ filterWorking : false ,
39+ keywords : '' ,
40+ matchSelf : false ,
3541 } ;
3642
3743 private lastInput ?: HTMLInputElement ;
@@ -100,6 +106,10 @@ export default class TreeTitle extends PureComponent<{
100106 visible : ! hidden ,
101107 } ) ;
102108 } ) ;
109+ treeNode . onFilterResultChanged ( ( ) => {
110+ const { filterWorking : newFilterWorking , keywords : newKeywords , matchSelf : newMatchSelf } = treeNode . filterReult ;
111+ this . setState ( { filterWorking : newFilterWorking , keywords : newKeywords , matchSelf : newMatchSelf } ) ;
112+ } ) ;
103113 }
104114 deleteClick = ( ) => {
105115 const { treeNode } = this . props ;
@@ -109,7 +119,7 @@ export default class TreeTitle extends PureComponent<{
109119 render ( ) {
110120 const { treeNode, isModal } = this . props ;
111121 const { pluginContext } = treeNode ;
112- const { editing } = this . state ;
122+ const { editing, filterWorking , matchSelf , keywords } = this . state ;
113123 const isCNode = ! treeNode . isRoot ( ) ;
114124 const { node } = treeNode ;
115125 const { componentMeta } = node ;
@@ -125,11 +135,9 @@ export default class TreeTitle extends PureComponent<{
125135 marginLeft : - indent ,
126136 } ;
127137 }
128- const { filterWorking, matchSelf, keywords } = treeNode . filterReult ;
129138 const Extra = pluginContext . extraTitle ;
130139 const { intlNode, common, config } = pluginContext ;
131- const Tip = common . editorCabin . Tip ;
132- const Title = common . editorCabin . Title ;
140+ const { Tip, Title } = common . editorCabin ;
133141 const couldHide = availableActions . includes ( 'hide' ) ;
134142 const couldLock = availableActions . includes ( 'lock' ) ;
135143 const couldUnlock = availableActions . includes ( 'unlock' ) ;
@@ -253,7 +261,7 @@ class RenameBtn extends PureComponent<{
253261} > {
254262 render ( ) {
255263 const { intl, common } = this . props . treeNode . pluginContext ;
256- const Tip = common . editorCabin . Tip ;
264+ const { Tip } = common . editorCabin ;
257265 return (
258266 < div
259267 className = "tree-node-rename-btn"
@@ -274,7 +282,7 @@ class LockBtn extends PureComponent<{
274282 render ( ) {
275283 const { treeNode, locked } = this . props ;
276284 const { intl, common } = this . props . treeNode . pluginContext ;
277- const Tip = common . editorCabin . Tip ;
285+ const { Tip } = common . editorCabin ;
278286 return (
279287 < div
280288 className = "tree-node-lock-btn"
@@ -300,7 +308,7 @@ class HideBtn extends PureComponent<{
300308 render ( ) {
301309 const { treeNode, hidden } = this . props ;
302310 const { intl, common } = treeNode . pluginContext ;
303- const Tip = common . editorCabin . Tip ;
311+ const { Tip } = common . editorCabin ;
304312 return (
305313 < div
306314 className = "tree-node-hide-btn"
0 commit comments