@@ -99,7 +99,7 @@ const HookMap: HookCompMapRawType = {
99
99
lodashJsLib : LodashJsLib ,
100
100
dayJsLib : DayJsLib ,
101
101
momentJsLib : DayJsLib , // old components use this hook
102
- utils : UtilsComp ,
102
+ utils : UtilsComp ,
103
103
message : MessageComp ,
104
104
toast : ToastComp ,
105
105
localStorage : LocalStorageComp ,
@@ -109,7 +109,7 @@ const HookMap: HookCompMapRawType = {
109
109
screenInfo : ScreenInfoHookComp ,
110
110
urlParams : UrlParamsHookComp ,
111
111
drawer : DrawerComp ,
112
- theme : ThemeComp ,
112
+ theme : ThemeComp ,
113
113
} ;
114
114
115
115
export const HookTmpComp = withTypeAndChildren ( HookMap , "title" , {
@@ -124,6 +124,7 @@ function SelectHookView(props: {
124
124
} ) {
125
125
const editorState = useContext ( EditorContext ) ;
126
126
const selectedComp = editorState . selectedComp ( ) ;
127
+
127
128
// Select the modal and its subcomponents on the left to display the modal
128
129
useEffect ( ( ) => {
129
130
if (
@@ -135,7 +136,13 @@ function SelectHookView(props: {
135
136
editorState . selectSource !== "leftPanel" )
136
137
) {
137
138
return ;
138
- } else if ( ( selectedComp as any ) . children . comp === props . comp ) {
139
+ } else if (
140
+ ( selectedComp as any ) . children . comp === props . comp
141
+ ) {
142
+ if ( ( selectedComp as any ) . children . comp ?. remoteInfo ?. isRemote ) {
143
+ return ;
144
+ }
145
+
139
146
// Select the current modal to display the modal
140
147
! props . comp . children . visible . getView ( ) . value &&
141
148
props . comp . children . visible . dispatch (
@@ -177,7 +184,7 @@ export class HookComp extends HookTmpComp {
177
184
}
178
185
179
186
override getView ( ) {
180
- const view = this . children . comp . getView ( ) ;
187
+ const view = this . children ? .comp ? .getView ( ) ;
181
188
if ( ! view ) {
182
189
// most hook components have no view
183
190
return view ;
0 commit comments