【问题标题】:To Hide Empty Column in Jspdf-Autotable在 Jspdf-Autotable 中隐藏空列
【发布时间】:2019-08-07 19:59:30
【问题描述】:

在 jspdf-autotable 中准备摘要报告。如何隐藏空列和标题

const headers=[["PRICE","CARRIER","CUSTOMER ID","QUANTITY"]] 
const data = this.state.data.map(elt=> [elt.price,elt.carrier,elt.from,elt.duration]); 

let content = {
  startY: 50,
  head: headers,
  body: data,

};

doc.text(title, marginLeft, 40);
doc.autoTable(content);

我希望输出隐藏 pdf 中的 customerid,因为它在 table 中没有任何数据

【问题讨论】:

    标签: reactjs jspdf jspdf-autotable


    【解决方案1】:

    最简单的解决方案可能是在将这些值传递给插件之前过滤掉它们。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-11-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多