nytimes / backbone.stickit

Backbone data binding, model binding plugin. The real logic-less templates.
MIT License
1.64k stars 176 forks source link

DOM Attribute bindings set empty attributes for empty values... #291

Closed mattbryson closed 9 years ago

mattbryson commented 9 years ago

Whilst this is kinds of expected, as its a refection of the data, is there any way to NOT store empty data attributes on the DOM if the model value is empty?

akre54 commented 9 years ago

Sure -- override update if you're doing something custom. Anything more advanced you should create a Handler for.

We can't change it for everyone, because that would break things like inputs or class names where we want to use an empty string for empty values.