React-data-grid: How can I display an image element in the react-data-grid?

Created on 20 May 2018  ·  2Comments  ·  Source: adazzle/react-data-grid

  • Have you already searched for similar issues? Please help us out and double-check first!

  • Also, please don't be that person who deletes this template. It's here for a reason.

  • Thanks!


Which version of React JS are you using? v16.2.0

✅ Officially supported ✅

  • [ ] v15.4.x

⚠️ Not officially supported, expect warnings ⚠️

  • [ ] v15.5.x
  • [ ] v15.6.x

☣️ Not officially supported, expect warnings and errors ☣️

  • [ ] v16.x.x

Which browser are you using? Chrome

✅ Officially supported ✅

  • [ ] IE 9 / IE 10 / IE 11
  • [ ] Edge
  • [ ] Chrome

⚠️ Not officially supported, but "should work" ⚠️

  • [ ] Firefox
  • [ ] Safari

I'm submitting a ...

  • [ ] 🐛 Bug Report
  • [x ] 💡 Feature Request

👋 Need general support? Not sure about how to use React itself, or how to get started with the Grid?
Please do not submit support request here. Instead see

https://github.com/adazzle/react-data-grid/blob/master/CONTRIBUTING.md


Issue Details

I have image urls stored in a database. Now I want to display some objects from my database in the grid.
All the other fields get displayed correctly except my image. I tried to create an image element in javascript and updated my records with the new image element dynamically. But still the image does not show. The div for that cell is empty.

Please include:
- What the current behavior is: Currently it just shows empty cell.
- What the desired behvaior is: It should an image. if the image is not found then it should show missing image.
- (If Bug) Steps to reproduce the issue
- (If Feature) The motivation / use case for the feature

We especially love screenshots / videos of problems, and remember
The Best Issue Is A Pull Request™

testimage

Question

All 2 comments

Please take a look at all features example. You should be able to use ImageFormatter

Closing this for good house keeping

Was this page helpful?
0 / 5 - 0 ratings