(e, group: IEditorGroup)
| 148 | |
| 149 | // click group title will open the first file in this group |
| 150 | const handleGroupClick = (e, group: IEditorGroup) => { |
| 151 | const { target } = e; |
| 152 | const firstFile = group.data?.[0]; |
| 153 | if (target.nextElementSibling && firstFile) { |
| 154 | onSelect?.(firstFile.id!, group.id!); |
| 155 | target.nextElementSibling.focus(); |
| 156 | } |
| 157 | }; |
| 158 | |
| 159 | const handleToolBarClick = ( |
| 160 | e: React.MouseEvent<Element, MouseEvent>, |