+
+ }
+ sorted={titleSorted}
+ readonly={props.readonly}
+ board={board}
+ activeView={activeView}
+ cards={cards}
+ views={views}
+ template={{id: Constants.titleColumnId, name: 'title', type: 'text', options: []}}
+ offset={resizingColumn === Constants.titleColumnId ? offset : 0}
+ onDrop={onDropToColumn}
+ onAutoSizeColumn={onAutoSizeColumn}
+ />
-
-
- }
- sorted={titleSorted}
- readonly={props.readonly}
- board={board}
- activeView={activeView}
- cards={cards}
- views={views}
- template={{id: Constants.titleColumnId, name: 'title', type: 'text', options: []}}
- offset={resizingColumn === Constants.titleColumnId ? offset : 0}
- onDrop={onDropToColumn}
- onAutoSizeColumn={onAutoSizeColumn}
- />
+ {/* Table header row */}
- {/* Table header row */}
+ {board.fields.cardProperties.filter((template: IPropertyTemplate) => activeView.fields.visiblePropertyIds.includes(template.id)).map((template: IPropertyTemplate) => {
+ let sorted: 'up' | 'down' | 'none' = 'none'
+ const sortOption = activeView.fields.sortOptions.find((o: ISortOption) => o.propertyId === template.id)
+ if (sortOption) {
+ sorted = sortOption.reversed ? 'down' : 'up'
+ }
- {board.fields.cardProperties.filter((template: IPropertyTemplate) => activeView.fields.visiblePropertyIds.includes(template.id)).map((template: IPropertyTemplate) => {
- let sorted: 'up' | 'down' | 'none' = 'none'
- const sortOption = activeView.fields.sortOptions.find((o: ISortOption) => o.propertyId === template.id)
- if (sortOption) {
- sorted = sortOption.reversed ? 'down' : 'up'
+ return (
+
+ )
+ })}
+
+
+ {/* Table rows */}
+
+ {activeView.fields.groupById &&
+ visibleGroups.map((group) => {
+ return (
+
)
+ })
}
- return (
-
- )
- })}
-
+ {/* No Grouping, Rows, one per card */}
+ {!activeView.fields.groupById &&
+
+ }
+
- {activeView.fields.groupById &&
- visibleGroups.map((group) => {
- return (
-
)
- })
- }
-
- {/* No Grouping, Rows, one per card */}
- {!activeView.fields.groupById &&
-
- }
-
- {!props.readonly && !activeView.fields.groupById &&
+ {/* Add New row */}
+
+ {!props.readonly && !activeView.fields.groupById &&
{
@@ -388,16 +388,17 @@ const Table = (props: Props): JSX.Element => {
defaultMessage='+ New'
/>
- }
-
+ }
+