reagent-project / reagent-forms

Bootstrap form components for Reagent
339 stars 78 forks source link

Use postwalk instead of prewalk in bind-fields. #16

Closed aeriksson closed 9 years ago

aeriksson commented 9 years ago

This enables forms that can be toggled, e.g. [:div {:field :alert :id :something :event exists?} [:input {:field :text :id :something-else}]]

This isn't possible if we use prewalk, since the alert field is processed before the input, causing the input to not be rendered.

AFAICT, this doesn't really have any negative consequences.

yogthos commented 9 years ago

thanks that looks great, I'll push out a new version shortly

yogthos commented 9 years ago

I just pushed out a new version [0.2.4] with the change.

yogthos commented 9 years ago

Would you mind adding an example for this use case in the readme? :)

aeriksson commented 9 years ago

Sure, I'll give it a shot :)