currently I am using Gridjs to display my table in my Reactjs application.
This is the code, the Name, and Email is displaying correctly, but the created_at is not, giving me empty. How can I display the data? thank you..
You need to define a custom id
for your column if you're using a JSON input.
Example:
const grid = new Grid({
columns: [{
id: 'name',
name: 'Name'
}, {
id: 'email',
name: 'Email'
}, {
id: 'phoneNumber',
name: 'Phone Number'
}],
data: [
{ name: 'John', email: 'john@example.com', phoneNumber: '(353) 01 222 3333' },
{ name: 'Mark', email: 'mark@gmail.com', phoneNumber: '(01) 22 888 4444' },
]
});