Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

fix: transforms on dataframe to be reactive (#3566)

Shahmir Varqha34d33c6c9d64
diff --git a/frontend/src/plugins/impl/data-frames/DataFramePlugin.tsx b/frontend/src/plugins/impl/data-frames/DataFramePlugin.tsx
index 5a6f3bb5ce..f67ecad2d3 100644
--- a/frontend/src/plugins/impl/data-frames/DataFramePlugin.tsx
+++ b/frontend/src/plugins/impl/data-frames/DataFramePlugin.tsx
@@ -217,14 +217,14 @@ export const DataFrameComponent = memo(
<TransformPanel
initialValue={internalValue}
columns={columns}
- onChange={(v) => {
+ onChange={(newValue) => {
// Ignore changes that are the same
- if (isEqual(v, internalValue)) {
+ if (isEqual(newValue, value)) {
return;
}
// Update the value valid changes
- setValue(v);
- setInternalValue(v);
+ setValue(newValue);
+ setInternalValue(newValue);
}}
onInvalidChange={setInternalValue}
getColumnValues={get_column_values}