This is an automated email from the ASF dual-hosted git repository.

tabish pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis-console.git


The following commit(s) were added to refs/heads/main by this push:
     new cb5596b  ARTEMIS-5362 - add an unselect all button to manage columns 
dialog
cb5596b is described below

commit cb5596bf85e0281e6b85a7575ade4442a95f2da4
Author: Andy Taylor <[email protected]>
AuthorDate: Fri Mar 21 10:31:25 2025 +0000

    ARTEMIS-5362 - add an unselect all button to manage columns dialog
---
 .../src/artemis-extension/artemis/messages/MessagesTable.tsx | 12 ++++++++++++
 .../src/artemis-extension/artemis/table/ArtemisTable.tsx     | 12 ++++++++++++
 2 files changed, 24 insertions(+)

diff --git 
a/artemis-console-extension/artemis-extension/src/artemis-extension/artemis/messages/MessagesTable.tsx
 
b/artemis-console-extension/artemis-extension/src/artemis-extension/artemis/messages/MessagesTable.tsx
index e20ebec..89ac245 100644
--- 
a/artemis-console-extension/artemis-extension/src/artemis-extension/artemis/messages/MessagesTable.tsx
+++ 
b/artemis-console-extension/artemis-extension/src/artemis-extension/artemis/messages/MessagesTable.tsx
@@ -164,6 +164,15 @@ export const MessagesTable: 
React.FunctionComponent<MessageProps> = props => {
     setColumns(updatedColumns);
   };
 
+  const unselectAllColumns = () => {
+    const updatedColumns = [...columns]
+    updatedColumns.map((column) => {
+      column.visible = false;
+      return false;
+    })
+    setColumns(updatedColumns);
+  };
+
   const onSave = () => {
     setColumnsModalOpen(!columnsModalOpen);
     artemisPreferencesService.saveColumnPreferences(columnStorage.messages, 
columns);
@@ -501,6 +510,9 @@ export const MessagesTable: 
React.FunctionComponent<MessageProps> = props => {
             <Text>Selected categories are displayed in the table.</Text>
             <Button isInline onClick={selectAllColumns} variant="link">
               Select all
+            </Button>{ ' | ' }
+            <Button isInline onClick={unselectAllColumns} variant="link">
+              Unselect all
             </Button>
           </TextContent>
         }
diff --git 
a/artemis-console-extension/artemis-extension/src/artemis-extension/artemis/table/ArtemisTable.tsx
 
b/artemis-console-extension/artemis-extension/src/artemis-extension/artemis/table/ArtemisTable.tsx
index 5716489..624f732 100644
--- 
a/artemis-console-extension/artemis-extension/src/artemis-extension/artemis/table/ArtemisTable.tsx
+++ 
b/artemis-console-extension/artemis-extension/src/artemis-extension/artemis/table/ArtemisTable.tsx
@@ -169,6 +169,15 @@ const operationOptions = [
     setColumns(updatedColumns);
   };
 
+  const unselectAllColumns = () => {
+    const updatedColumns = [...columns]
+    updatedColumns.map((column) => {
+      column.visible = false;
+      return false;
+    })
+    setColumns(updatedColumns);
+  };
+
   const onSearchTextChange = (newValue: string) => {
     setInputValue(newValue);
   };
@@ -261,6 +270,9 @@ const operationOptions = [
             <Text>Selected categories are displayed in the table.</Text>
             <Button isInline onClick={selectAllColumns} variant="link">
               Select all
+            </Button>{ ' | ' }
+            <Button isInline onClick={unselectAllColumns} variant="link">
+              Unselect all
             </Button>
           </TextContent>
         }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to