angular-material icon indicating copy to clipboard operation
angular-material copied to clipboard

Add Support for mat-form-field appearance

Open ArulRozario opened this issue 5 years ago • 6 comments

Would it be possible to add an @Input to mat-form-io or any other means to have different appearance to form-fileds as shown herehttps://stackblitz.com/angular/malkplgnkdb?file=src%2Fapp%2Fform-field-appearance-example.html. Our project heavily relies on Material form-io and we have all the fields with an outline appearance.

ArulRozario avatar Jan 29 '20 12:01 ArulRozario

That should be a simple addition. This would make it so it can take an appearance input in the mat-formio. @vlad-shusterman can you maybe easily add this feature?

travist avatar Jan 29 '20 15:01 travist

Hi any update on this?

paramjeetnandal avatar Mar 05 '20 09:03 paramjeetnandal

@paramjeetnandal, @ArulRozario
Hey, we've done with this feature. Now you can use it like this:

{
  "label": "Textfield",
  "mask": false,
  "type": "textfield",
  "input": true,
  "key": "textfield",
  "appearance": "standard"
}

vlad-shusterman avatar Mar 06 '20 13:03 vlad-shusterman

Thanks. Does this apply to all input fields like select, text area, datepicker etc?. the PR seems to have only text field.

ArulRozario avatar Mar 07 '20 17:03 ArulRozario

@paramjeetnandal, @ArulRozario Hey, we've done with this feature. Now you can use it like this:

{
  "label": "Textfield",
  "mask": false,
  "type": "textfield",
  "input": true,
  "key": "textfield",
  "appearance": "standard"
}

Could explain this briefly with full json

rspsuresh avatar Mar 26 '20 13:03 rspsuresh

@rspsuresh you could set the appearance to outline globally using a provider. Here is an example https://codinglatte.com/posts/angular/angular-material-form-field-appearance/

sadly https://github.com/formio/angular-material-formio/pull/58 breaks that behavior. I have created a PR https://github.com/formio/angular-material-formio/pull/76 to solve the issue.

albert5287 avatar Apr 21 '20 15:04 albert5287