Visjs / React:更新项目

时间:2019-01-12 00:44:27

标签: reactjs vis.js vis.js-network vis.js-timeline

我正在尝试访问content,并且我认为由于map的结果已分配给array,所以我可以这样做。但是我遇到一个错误:Cannot read property filter of undefined

问题:如何访问content中存储的值?

render(){

const array = data.abs.map(a, index) => ({
  id: index + 1, 
  content: abs.Ent, 
  start: abs.time, 
  title: abs.Trc, 
  end: null
}));

const items = new vis.DataSet([array]);
let exes = items.content.filter(t => String(t.content).includes('.exe'));
itemsP.update({id:exesGroup.id, group:1});

0 个答案:

没有答案