mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	Ensure library list has an item selected when opened
This commit is contained in:
		| @@ -676,7 +676,8 @@ RED.clipboard = (function() { | ||||
|                     done(children); | ||||
|                 }) | ||||
|             } | ||||
|         }]); | ||||
|         }], true); | ||||
|  | ||||
|     } | ||||
|  | ||||
|     function hideDropTarget() { | ||||
|   | ||||
| @@ -384,7 +384,11 @@ | ||||
|                 }) | ||||
|                 return res; | ||||
|             } | ||||
|             return s.parent().data('data'); | ||||
|             if (s.length) { | ||||
|                 return s.parent().data('data'); | ||||
|             } else { | ||||
|                 return undefined; | ||||
|             } | ||||
|         } | ||||
|     }); | ||||
|  | ||||
|   | ||||
| @@ -431,11 +431,13 @@ RED.library = (function() { | ||||
|             focus: function() { | ||||
|                 dirList.focus(); | ||||
|             }, | ||||
|             data: function(content) { | ||||
|             data: function(content,selectFirst) { | ||||
|                 dirList.treeList('data',content); | ||||
|                 // setTimeout(function() { | ||||
|                 //     dirList.treeList('select',content[0]); | ||||
|                 // },100); | ||||
|                 if (selectFirst) { | ||||
|                     setTimeout(function() { | ||||
|                         dirList.treeList('select',content[0]); | ||||
|                     },100); | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|     } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user