This is an automated email from the ASF dual-hosted git repository. andytaylor pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/activemq-artemis-console.git
commit c8a15340be558cdd61df8a6e7f8478777e50240b Author: GChuf <[email protected]> AuthorDate: Sat May 31 00:06:19 2025 +0200 ARTEMIS-5511 - small tbody improvement --- .../src/table/ArtemisTable.tsx | 25 ++++++++++------------ 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/artemis-console-extension/artemis-extension/packages/artemis-console-plugin/src/table/ArtemisTable.tsx b/artemis-console-extension/artemis-extension/packages/artemis-console-plugin/src/table/ArtemisTable.tsx index 972c48d..fc3ae60 100644 --- a/artemis-console-extension/artemis-extension/packages/artemis-console-plugin/src/table/ArtemisTable.tsx +++ b/artemis-console-extension/artemis-extension/packages/artemis-console-plugin/src/table/ArtemisTable.tsx @@ -492,20 +492,17 @@ const operationOptions = [ {rows.map((row, rowIndex) => ( <Tr key={rowIndex}> <> - {columns.map((column, id) => { - if (column.visible) { - var key = getKeyByValue(row, column.id) - if(column.filter) { - var filter = column.filter(row); - return <Td key={id}><Link to="" onClick={() => {if (broker.navigate) { broker.navigate(column.filterTab, filter)}}}>{key}</Link></Td> - } else if (column.link) { - return <Td key={id}><Link to="" onClick={() => {if (column.link) {column.link(row)}}}>{key}</Link></Td> - } else { - return <Td key={id}>{key}</Td> - } - } else return '' - } - )} + {columns.filter((column) => column.visible).map((column, id) => { + const key = getKeyByValue(row, column.id) + if(column.filter) { + const filter = column.filter(row); + return <Td key={id}><Link to="" onClick={() => {if (broker.navigate) { broker.navigate(column.filterTab, filter)}}}>{key}</Link></Td> + } else if (column.link) { + return <Td key={id}><Link to="" onClick={() => {if (column.link) column.link(row)}}>{key}</Link></Td> + } else { + return <Td key={id}>{key}</Td> + } + })} <Td isActionCell> <ActionsColumn items={getRowActions(row, rowIndex)} --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information, visit: https://activemq.apache.org/contact
