Skip to content

Commit

Permalink
feat(app): add apply button to column header popup (#3610)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholaspun-wandb authored Feb 6, 2025
1 parent 8bbba86 commit c6dcf6c
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
27 changes: 26 additions & 1 deletion weave-js/src/components/Panel2/PanelTable/ColumnHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,10 @@ export const ColumnHeader: React.FC<{
workingSelectFunction.type !== 'invalid'
) {
let panelUpdated = false;
if (workingSelectFunction !== propsSelectFunction) {
if (
weave.expToString(workingSelectFunction) !==
weave.expToString(propsSelectFunction)
) {
newState = Table.updateColumnSelect(
newState,
colId,
Expand Down Expand Up @@ -658,6 +661,28 @@ export const ColumnHeader: React.FC<{
</S.PanelSettings>
)}
</S.ColumnEditorSection>
<S.ColumnEditorSection>
<Button
data-test="column-header-apply"
size="small"
disabled={
weave.expToString(workingSelectFunction) ===
weave.expToString(propsSelectFunction) &&
workingColumnName === propsColumnName &&
workingPanelId === propsPanelId &&
workingPanelConfig === propsPanelConfig
}
twWrapperStyles={{
display: 'flex',
justifyContent: 'flex-end',
}}
onClick={() => {
applyWorkingState();
setColumnSettingsOpen(false);
}}>
Apply
</Button>
</S.ColumnEditorSection>
</div>
)
}
Expand Down
1 change: 0 additions & 1 deletion weave-js/src/panel/WeaveExpression/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,6 @@ export class WeaveExpressionState {
this.trace(`...live updating expression`);
this.setExpression(newExpr as NodeOrVoidNode);
}
return;
}

if (ReactEditor.isFocused(this.editor)) {
Expand Down

0 comments on commit c6dcf6c

Please sign in to comment.