From 2aaf27bb6991211f69d01e30d2b4602dcf740ff6 Mon Sep 17 00:00:00 2001 From: Mason Herron <46727170+Supplementing@users.noreply.github.com> Date: Thu, 26 Jun 2025 08:48:46 -0600 Subject: [PATCH] [Fleet] Fix CSV download when no fields are chosen (#225368) ## Summary Closes #218097 - Added check to stop download button from being active when no fields are selected as it doesnt make sense to download a CSV with zero fields. ![image](https://github.com/user-attachments/assets/0c69bade-a464-49a4-8276-1845e0f887e9) ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) ### Identify risks N/A --------- Co-authored-by: Elastic Machine --- .../sections/agents/components/agent_export_csv_modal/index.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/x-pack/platform/plugins/shared/fleet/public/applications/fleet/sections/agents/components/agent_export_csv_modal/index.tsx b/x-pack/platform/plugins/shared/fleet/public/applications/fleet/sections/agents/components/agent_export_csv_modal/index.tsx index e289f660eb00..d5fb0354ab03 100644 --- a/x-pack/platform/plugins/shared/fleet/public/applications/fleet/sections/agents/components/agent_export_csv_modal/index.tsx +++ b/x-pack/platform/plugins/shared/fleet/public/applications/fleet/sections/agents/components/agent_export_csv_modal/index.tsx @@ -70,6 +70,7 @@ export const AgentExportCSVModal: React.FunctionComponent = ({ return (