powmedia / backbone-forms

Form framework for BackboneJS with nested forms, editable lists and validation
MIT License
2.17k stars 415 forks source link

lodash 4.x support #515

Closed ludoo0d0a closed 7 years ago

ludoo0d0a commented 8 years ago

Please add lodash 4.x support

This code won't work anymore :

    _.each(fieldsetSchema, function(itemSchema) {
      this.fieldsets.push(this.createFieldset(itemSchema));
    }, this);

Because :

Removed thisArg params from most methods because they were largely unused, complicated implementations, & can be tackled with _.bind, Function#bind, or arrow functions

https://github.com/lodash/lodash/wiki/Changelog#v400

glenpike commented 8 years ago

Note-to-self: _.each() use with binding https://github.com/powmedia/backbone-forms/blob/master/distribution/backbone-forms.js#L92 https://github.com/powmedia/backbone-forms/blob/master/distribution/backbone-forms.js#L101 https://github.com/powmedia/backbone-forms/blob/master/distribution/backbone-forms.js#L1967 https://github.com/powmedia/backbone-forms/blob/master/distribution/backbone-forms.js#L1840