Skip to content
This repository has been archived by the owner on Oct 6, 2020. It is now read-only.

'readOnly' isn't a known property of 'md2-select' #68

Closed
yuzhva opened this issue Jan 24, 2017 · 3 comments
Closed

'readOnly' isn't a known property of 'md2-select' #68

yuzhva opened this issue Jan 24, 2017 · 3 comments

Comments

@yuzhva
Copy link

yuzhva commented Jan 24, 2017

Looks like that property is missing )=

https://github.com/Promact/md2/blob/master/src/lib/select/select.ts

<md2-select id="uniqId" formControlName="selectName" [readonly]="!isAbleToEditForm ? true : null">
    <md2-option value="uniqValue">uniqValue</md2-option>
</md2-select>
@dharmeshpipariya-zz
Copy link
Contributor

@yuzhva you can use 'disabled' instead of 'readonly'

@yuzhva
Copy link
Author

yuzhva commented Jan 26, 2017

@dharmeshpipariya

Yeah - I did it. The other side of 'disabled' property is when you are trying to use it with FormBuilder.

It looks like you're using the disabled attribute with a reactive form directive. If you set disabled to true
when you set up this control in your component class, the disabled attribute will actually be set in the DOM for
you. We recommend using this approach to avoid 'changed after checked' errors.

  Example: 
  form = new FormGroup({
    first: new FormControl({value: 'Nancy', disabled: true}, Validators.required),
    last: new FormControl('Drew', Validators.required)
  });

So I found how to use md2 date picker, just opened that issue to mentioned that this property is missed.

@dharmeshpipariya-zz
Copy link
Contributor

we have fixed FormBuilder issue with #114

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants