ais-one/cookbook

Image in crud table

Closed this issue · 2 comments

how to render url image inside the table ?

you can edit the custom form that you create to display the images, it would be better to put it in the FORM rather than the table because if you have many records, it is going to load alot of pictures...

even small thumbnails can become a problem...

If you really insist on putting it in the tables, you can try in the your custom JS file

export const crudTable = {
  headers: [
    { text: 'Party Name', value: 'name' },
    { text: 'Status', value: 'status' }
  ],
  formatters: (value, _type) => {
    if (_type == 'yourImageField') return `<img src="${value}" />`
    return value
  }
}

I think the _type is the name of your field, you can do console.log to check

Closing due to no further response