File tree 2 files changed +7
-3
lines changed
2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -14,23 +14,24 @@ export interface ITab {
14
14
name ?: string ; // fileName
15
15
activeTab ?: number ; // activeTab
16
16
modified ?: boolean ; // modify file
17
+ renderPane ?: ( ) => React . ReactNode ;
18
+ value ?: string ;
17
19
}
18
20
export interface ITabsProps {
19
21
data : ITab [ ] ;
20
22
closeTab ?: ( item : ITab ) => void ;
21
23
onMoveTab ?: ( tabs : ITab [ ] ) => void ;
22
24
selectTab ?: ( index : number ) => void ;
23
- // onMoveTab: (dragIndex?: number, hoverIndex?: number | string) => void;
24
25
onTabChange : ( index : number ) => void ;
25
26
}
26
27
27
28
const DraggleTabs = ( props : ITabsProps ) => {
28
- const { data, onMoveTab , selectTab } = props ;
29
+ const { data, selectTab } = props ;
29
30
30
31
const onMoveTab = useCallback (
31
32
( dragIndex , hoverIndex ) => {
32
33
const dragTab = data [ dragIndex ] ;
33
- onMoveTab ?.(
34
+ props . onMoveTab ?.(
34
35
update ( data , {
35
36
$splice : [
36
37
[ dragIndex , 1 ] ,
Original file line number Diff line number Diff line change @@ -71,6 +71,9 @@ export class EditorModel implements IEditor {
71
71
this . current = current ;
72
72
this . groups = groups ;
73
73
}
74
+ closeAll ?: ( ( ) => void ) | undefined ;
75
+ onClose ?: ( ( ) => void ) | undefined ;
76
+ onMoveTab : ( tabs : ITab [ ] , group ?: number | undefined ) => void ;
74
77
75
78
public render ! : ( ) => React . ReactNode ;
76
79
You can’t perform that action at this time.
0 commit comments