MDB Bootstrap Support


Topic: MDB Bootstrap Support

krivera asked 6 years ago

When i declare columns , the DataTable component take all props from my object and print all object on the view, for example:

columns : [{
 
label:'Alias',
field:'alias',
sort:'asc',
}, {
 
label:'Nombre Completo',
field:'nombre',
sort:'asc'
}, {
 
label:'Correo',
field:'correo',
sort:'asc'
}]
 
 
Object:[{uid"X84n7pd3xNURaVFWT66Ox1jCf102"correo"administrador@admin.com.mx "alias"adm"nombre"Administrador adm adm"telefono"5555555555"}, {uid"KWKZ9mLfIYVTuo9h7zq5WycMOQ83"correo"adrian.perdomo@gnp.com.mx"alias"Adrian"nombre"Adrian Perdomo "telefono"5564848948945"}]
 
View:
 
Image from view

Jakub Mandra staff premium answered 6 years ago

Hi,

Row fields has to be in correspondence with column fields in proper order.

So structure beneath will be displayed correctly:

columns : [{
label:'Alias',
field:'alias',
sort:'asc',
}, {
label:'Nombre Completo',
field:'nombre',
sort:'asc'
}, {
label:'Correo',
field:'correo',
sort:'asc'
}]
Object:[{
alias"adm"
nombre"Administrador adm adm"
correo"administrador@admin.com.mx "
},
 
alias"Adrian"
nombre"Adrian Perdomo ",
correo"adrian.perdomo@gnp.com.mx"
}]

Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue
  • User: Free
  • Premium support: No
  • Technology: MDB React
  • MDB Version: 4.8.4
  • Device: WEB
  • Browser: any
  • OS: any
  • Provided sample code: Yes
  • Provided link: Yes
Tags