Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: MDB Bootstrap Support

krivera free 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 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

  • ForumUser: 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