udos86/ng-dynamic-forms

File Upload Doesn't Work In Angular Material

FI55 opened this issue · 0 comments

FI55 commented

I'm submitting a


[x] Bug / Regression
[ ] Feature Request / Proposal

I'm using


NG Dynamic Forms Version: `15.0.0`

[ ] Basic UI
[ ] Bootstrap UI  
[ ] Foundation UI
[ ] Ionic UI
[ ] Kendo UI
[x] Material  
[ ] NG Bootstrap
[ ] Prime NG

Description

In the documentation is File Upload is supported by setting the inputType to "file" but when that is done Angular Material complaints that it doesn't accept that:

ERROR Error: Input type "file" isn't supported by matInput.
    at getMatInputUnsupportedTypeError (input.mjs:25:12)
   

The solution can be found in this answer: https://stackoverflow.com/a/64598305

For Angular Material the File Upload Input has to be placed outside of the mat-form-field, like this it still includes the value into the FormGroup. If you can give me directions on where to fix it, I can fix the issue and post a PR?