hello the component does not seem to work on vaadin 12. Nothing happens whe

hello the component does not seem to work on vaadin 12. Nothing happens when I click on my button.

My ByteArrayInputStream is not null and contains a valid document because I can write it in a directory with a FileOutputStream

        ByteArrayInputStream bs=excelService.exportExcel(nameTemplate);
        FileDownloadWrapper fileDownloadWrapper=new FileDownloadWrapper(
                new StreamResource("fsdfs.xlsx",
                        ()->bs));

        exportExcel=new Button("Export excel");
        exportExcel.setClassName("menu-button-asset-edit");
        fileDownloadWrapper.wrapComponent(exportExcel);

Am I wrong somewhere?
as in vaadin 7 or 8, the object uses the browser download interface?

Are you adding the exportExcel button to a layout instead of the fileDownloadWrapper? This simple example seems to work ok for me in V12:

        Button button = new Button("Click to download");
        FileDownloadWrapper buttonWrapper = new FileDownloadWrapper(
                new StreamResource("foo.txt", () -> new ByteArrayInputStream("foo".getBytes())));
        buttonWrapper.wrapComponent(button);
        add(buttonWrapper);

thanks you. I was adding the button and not the filedwonloaderWrapper