Our blazing fast Grid component built with pure JavaScript


Post by Bhava »

Hi Team,
I tried to access the records inside renderer in an actioncolumn. But it seems the record is displaying as undefined.
I have attached the screenshot

Attachments
Screenshot (82).png
Screenshot (82).png (117.26 KiB) Viewed 781 times

Post by Maxim Gorkovsky »

Hello.
I tried adding such column in the same demo, both action and record are accessible:

{
  type : 'action',
  text : 'foo',
  actions : [{
    renderer : ({ action, record }) => { console.log(action, record); return '<i></i>' },
  }]
}

Please check again? Try to log variables instead of pausing in the debugger?


Post by Bhava »

We tried the same, but why the first value is showing as undefined

Attachments
Screenshot (84).png
Screenshot (84).png (205.46 KiB) Viewed 775 times

Post by mats »

First one is the Group header record. Ignore it by checking record.isSpecialRow


Post by Maxim Gorkovsky »

Indeed, in the online version there is a single extra renderer called without a record. Try ignoring that like:

renderer({ record }) {
  if (!record) { return '' }
}

Post by Bhava »

Got it. Thank you


Post Reply