From 2e9934d26c62b9b8f846312711da0b30bcaad286 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aar=C3=B3n=20Garc=C3=ADa=20Herv=C3=A1s?= Date: Fri, 12 Apr 2024 00:01:27 +0200 Subject: [PATCH] Add change event handler to file upload input --- docs/data/material/components/buttons/InputFileUpload.js | 8 ++++++-- docs/data/material/components/buttons/InputFileUpload.tsx | 8 ++++++-- .../components/buttons/InputFileUpload.tsx.preview | 8 ++++++-- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/docs/data/material/components/buttons/InputFileUpload.js b/docs/data/material/components/buttons/InputFileUpload.js index d1cfcba03567ac..e939eba055432b 100644 --- a/docs/data/material/components/buttons/InputFileUpload.js +++ b/docs/data/material/components/buttons/InputFileUpload.js @@ -24,8 +24,12 @@ export default function InputFileUpload() { tabIndex={-1} startIcon={} > - Upload file - + Upload files + console.log(event.target.files)} + multiple + /> ); } diff --git a/docs/data/material/components/buttons/InputFileUpload.tsx b/docs/data/material/components/buttons/InputFileUpload.tsx index d1cfcba03567ac..e939eba055432b 100644 --- a/docs/data/material/components/buttons/InputFileUpload.tsx +++ b/docs/data/material/components/buttons/InputFileUpload.tsx @@ -24,8 +24,12 @@ export default function InputFileUpload() { tabIndex={-1} startIcon={} > - Upload file - + Upload files + console.log(event.target.files)} + multiple + /> ); } diff --git a/docs/data/material/components/buttons/InputFileUpload.tsx.preview b/docs/data/material/components/buttons/InputFileUpload.tsx.preview index 69ab491553d7c8..c2dccf123cc789 100644 --- a/docs/data/material/components/buttons/InputFileUpload.tsx.preview +++ b/docs/data/material/components/buttons/InputFileUpload.tsx.preview @@ -5,6 +5,10 @@ tabIndex={-1} startIcon={} > - Upload file - + Upload files + console.log(event.target.files)} + multiple + /> \ No newline at end of file