From 941d64ecd77a56049606058248db26f37ff179ef Mon Sep 17 00:00:00 2001 From: Marcus Hof <13001502+MarconLP@users.noreply.github.com> Date: Tue, 12 Mar 2024 16:01:49 +0100 Subject: [PATCH] feat: show currently selected file in the plugin UploadField (#20827) show currently selected file in the plugin UploadField --- .../src/scenes/plugins/edit/UploadField.tsx | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/frontend/src/scenes/plugins/edit/UploadField.tsx b/frontend/src/scenes/plugins/edit/UploadField.tsx index 16b27528532e8..6c4a90720a11d 100644 --- a/frontend/src/scenes/plugins/edit/UploadField.tsx +++ b/frontend/src/scenes/plugins/edit/UploadField.tsx @@ -2,12 +2,15 @@ import { LemonFileInput } from '@posthog/lemon-ui' export function UploadField({ value, onChange }: { value?: File; onChange?: (file: File) => void }): JSX.Element { return ( - onChange?.(files[0])} - value={value?.size ? [value] : []} - showUploadedFiles={false} - /> + <> + {value?.name ? Selected file: {value.name} : null} + onChange?.(files[0])} + value={value?.size ? [value] : []} + showUploadedFiles={false} + /> + ) }