Open CarlosML opened 9 years ago
Thanks for reporting this issue, I definitely don't have tests for this case. What do you think will be the best way to visualize that type of data inside the admin, and enable the user to modify it?
Hi
I had the same issue and a quick solution is modifying exports.value function in node_modules/express-admin/lib/format/form.js as:
else if (column.control.textarea && typeof value === 'object') {
return JSON.stringify(value);
}
else {
return value;
}
It displays the json value as string, then when I've time I'll add this editor so it will be also editable easily
Same here with interval types.
A similar quick solution works on form.js:
else if (column.control.text && typeof value === 'object' && value.toPostgres != 'undefined') {
return value.toPostgres()
}
If you define a column as JSON with Postgres, it shows as '[object Object]' in express-admin.