reagent-project / reagent-forms

Bootstrap form components for Reagent
339 stars 78 forks source link

add disabled to inputs #42

Closed oborder closed 9 years ago

oborder commented 9 years ago

Add support for disabling inputs..

yogthos commented 9 years ago

I was just doing a bit of testing. I was originally under the impressions that :disabled uses a decisions function, but it appears that it's simply a boolean value. In this case the change is not actually necessary. Any keys you specify in the attribute map will already be propagated to the component.

yogthos commented 9 years ago

@oborder so just to confirm I understand the problem correctly. You're trying to do stuff like:

[:input {:field :text :id :first-name :disabled true}]

where :disabled points to a value as opposed to a function. Originally, I assumed you were trying to assigned a decision function there. The latter doesn't appear to be possible. The change shouldn't be needed for the former case however.