I have two elements, an InputFile and a button. And I want to simulate a click on InputFile upon clicking the button. I have it working with Js now but would like to know if there's a blazor way of doing it.An example gif
and this is the current blazor code
<InputFile id="filePicker" /><button type="button" @onclick="OpenFilePicker">or Select</button>private async Task OpenFilePicker() => await JsRuntime.InvokeVoidAsync("clickElement");and with this Js code I can make it work though,
clickElement = () => document.getElementById('filePicker').click();Is there a better solution without Js dependency ?