udos86 / ng-dynamic-forms

Rapid form development library for Angular
ISC License
1.32k stars 367 forks source link

adding readonly attribute to textarea #792

Open rernens opened 6 years ago

rernens commented 6 years ago

I'm submitting a


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

I'm using


NG Dynamic Forms Version: `6.0.6`

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

Description

It would be nice to have the ability to set the readonly attribute of textarea to true through config so that a textarea would remain scrollable but not updatable unlike disabled that does not allow scroll.

Really usefull to display terms & conditions, and use scroll event to check that user has « read » the textarea content prior to checking a checkbox confirming its acceptance.

Karamuto commented 6 years ago

Hello @rernens ,

I think this feature is already implemented. Just use 'readonly: true' in the TextAreaModel.

rernens commented 6 years ago

@Karamuto

Thought also it was, but it does not work. Will do further check with the most recent version but meanwhile I had another issue that forces me to use a textarea outside of ng-dynamic-forms in order to use a custom directive to intercept scrolling on text area.