From 57071c010c0ee2c6efff26985044508e779a4f9f Mon Sep 17 00:00:00 2001 From: Mattermost Build Date: Wed, 9 Feb 2022 17:00:52 +0100 Subject: [PATCH] calculation column order to be based on view (#2262) (#2304) (cherry picked from commit 73420bcf2a858715ab4ae0722e3360b754a826f5) Co-authored-by: Scott Bishel --- webapp/src/components/table/calculation/calculationRow.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/src/components/table/calculation/calculationRow.tsx b/webapp/src/components/table/calculation/calculationRow.tsx index 17b9ab655a0..712cdc3c7b4 100644 --- a/webapp/src/components/table/calculation/calculationRow.tsx +++ b/webapp/src/components/table/calculation/calculationRow.tsx @@ -39,7 +39,7 @@ const CalculationRow = (props: Props): JSX.Element => { const templates: IPropertyTemplate[] = [ titleTemplate, - ...props.board.fields.cardProperties.filter((template) => props.activeView.fields.visiblePropertyIds.includes(template.id)), + ...props.activeView.fields.visiblePropertyIds.map((id) => props.board.fields.cardProperties.find((t) => t.id === id)).filter((i) => i) as IPropertyTemplate[], ] const selectedCalculations = props.board.fields.columnCalculations || []