GigaTables / reactables

GigaTables is a ReactJS plug-in to help web-developers process table-data in applications and CMS, CRM, ERP or similar systems.
MIT License
144 stars 30 forks source link

Hoek.applyToDefaults breaks promise passed in ajax property!!! #109

Closed MichaelF77 closed 6 years ago

MichaelF77 commented 6 years ago

Spend many hours trying to figure out why does not the latest version work with promise passed as ajax, turns out it's due to the change from

this.settings = loAssign({}, this.defaultSettings, this.props.settings); to this.settings = Hoek.applyToDefaults(this.defaultSettings, this.props.settings);

The Hoek call breaks Promise passed in ajax!! Please fix it asap.

To reproduce: replace ajax: 'http://example.com/your/tabledata' with ajax: new Promise( (resolve) => resolve('http://example.com/your/tabledata'))

To fix (tested by doing it locally): add following line after this.settings = Hoek.applyToDefaults(this.defaultSettings, this.props.settings); this.settings.ajax = this.props.settings.ajax;

arthurkushman commented 6 years ago

Fixed - https://github.com/GigaTables/reactables/releases/tag/2.4.52