@marimo-team/islands 0.21.1-dev14 → 0.21.1-dev17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -158,12 +158,19 @@ export const GridLayoutRenderer: React.FC<Props> = ({
|
|
|
158
158
|
compactType={null}
|
|
159
159
|
preventCollision={true}
|
|
160
160
|
rowHeight={layout.rowHeight}
|
|
161
|
-
onLayoutChange={(cellLayouts) =>
|
|
161
|
+
onLayoutChange={(cellLayouts) => {
|
|
162
|
+
// Don't update state in read mode — the layout is static and
|
|
163
|
+
// updating triggers a re-render cycle that causes an infinite loop
|
|
164
|
+
// (React error https://react.dev/errors/185 Maximum update depth exceeded).
|
|
165
|
+
// https://github.com/marimo-team/marimo/issues/8644
|
|
166
|
+
if (isReading) {
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
162
169
|
setLayout({
|
|
163
170
|
...layout,
|
|
164
171
|
cells: cellLayouts,
|
|
165
|
-
})
|
|
166
|
-
}
|
|
172
|
+
});
|
|
173
|
+
}}
|
|
167
174
|
droppingItem={
|
|
168
175
|
droppingItem
|
|
169
176
|
? {
|