jsoma / tabletop

Tabletop.js gives spreadsheets legs
MIT License
3.77k stars 444 forks source link

Unable to use postProcess with beforeReady #172

Closed superlou closed 4 years ago

superlou commented 4 years ago

I might be using this wrong, but I noticed that postProcess was never called. Looking inside beforeReady:

https://github.com/jsoma/tabletop/blob/05163cf456b08e1345889ae9757f4d66b4c69b67/src/tabletop.js#L545-L551

The first thing is that this doesn't seem to have a postProcess attribute, though this.tabletop.postProcess exists. The following seems to work, though I feel like maybe I'm just using the library incorrectly:

    beforeReady: function() {
      if(this.tabletop.postProcess) {
        for (let i = 0, ilen = this.elements.length; i < ilen; i++) {
          this.tabletop.postProcess(this.elements[i]);
        }
      }
    },