You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: plugins/ui/src/js/src/layout/ReactPanel.tsx
+46-45Lines changed: 46 additions & 45 deletions
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,7 @@ import { nanoid } from 'nanoid';
10
10
import{
11
11
LayoutUtils,
12
12
PanelEvent,
13
+
PanelIdContext,
13
14
useLayoutManager,
14
15
useListener,
15
16
}from'@deephaven/dashboard';
@@ -218,52 +219,52 @@ function ReactPanel({
218
219
returnportal
219
220
? ReactDOM.createPortal(
220
221
<ReactPanelContext.Providervalue={panelId}>
221
-
<View
222
-
height="100%"
223
-
width="100%"
224
-
backgroundColor={backgroundColor}
225
-
padding={padding}
226
-
paddingTop={paddingTop}
227
-
paddingBottom={paddingBottom}
228
-
paddingStart={paddingStart}
229
-
paddingEnd={paddingEnd}
230
-
paddingX={paddingX}
231
-
paddingY={paddingY}
232
-
overflow={overflow}
233
-
UNSAFE_style={UNSAFE_style}
234
-
UNSAFE_className={
235
-
UNSAFE_className==null
236
-
? 'dh-react-panel'
237
-
: `${UNSAFE_className} dh-react-panel`
238
-
}
239
-
>
240
-
<Flex
241
-
UNSAFE_className="dh-inner-react-panel"
242
-
wrap={wrap}
243
-
direction={direction}
244
-
justifyContent={justifyContent}
245
-
alignContent={alignContent}
246
-
alignItems={alignItems}
247
-
gap={gap}
248
-
rowGap={rowGap}
249
-
columnGap={columnGap}
222
+
<PanelIdContext.Providervalue={panelId}>
223
+
<View
224
+
height="100%"
225
+
width="100%"
226
+
backgroundColor={backgroundColor}
227
+
padding={padding}
228
+
paddingTop={paddingTop}
229
+
paddingBottom={paddingBottom}
230
+
paddingStart={paddingStart}
231
+
paddingEnd={paddingEnd}
232
+
paddingX={paddingX}
233
+
paddingY={paddingY}
234
+
overflow={overflow}
235
+
UNSAFE_style={UNSAFE_style}
236
+
UNSAFE_className={
237
+
UNSAFE_className==null
238
+
? 'dh-react-panel'
239
+
: `${UNSAFE_className} dh-react-panel`
240
+
}
250
241
>
251
-
<ReactPanelErrorBoundaryonReset={onErrorReset}>
252
-
{/**
253
-
* Don't render the children if there's an error with the widget. If there's an error with the widget, we can assume the children won't render properly,
254
-
* but we still want the panels to appear so things don't disappear/jump around.
255
-
*/}
256
-
<PersistentStateProvider
257
-
initialState={initialData}
258
-
onChange={onDataChange}
259
-
>
260
-
{React.Children.map(renderedChildren,child=>
261
-
React.cloneElement(childasReact.ReactElement)
262
-
)}
263
-
</PersistentStateProvider>
264
-
</ReactPanelErrorBoundary>
265
-
</Flex>
266
-
</View>
242
+
<Flex
243
+
UNSAFE_className="dh-inner-react-panel"
244
+
wrap={wrap}
245
+
direction={direction}
246
+
justifyContent={justifyContent}
247
+
alignContent={alignContent}
248
+
alignItems={alignItems}
249
+
gap={gap}
250
+
rowGap={rowGap}
251
+
columnGap={columnGap}
252
+
>
253
+
<ReactPanelErrorBoundaryonReset={onErrorReset}>
254
+
{/**
255
+
* Don't render the children if there's an error with the widget. If there's an error with the widget, we can assume the children won't render properly,
256
+
* but we still want the panels to appear so things don't disappear/jump around.
0 commit comments