Topic: Change language of MDBDataTable

javierspano free asked 6 years ago


When I use the component MDBDataTable I can't change the language as I do in the jquery version of DataTables (I mean this DataTable), specifically I would like to change the info and search text without having to get the elements with JS and modify them.
In case you ask for the code...
.
.
.
return (
  <MDBDataTable
    className="grey lighten-4"
    striped
    bordered
    responsive
    data={this.state.data}
  />
);
.
.
.

michael qiang free answered 6 years ago


Seems the MDBTable will bind to the first time data, is it possible to change the data feed into the component? Seems MDBTable will keep the first version of data always and ignore the later data change even if the parent component is re-rendering  

Anna Morawska staff commented 6 years ago

Hi michael qiang, thank you for reporting this, for now, it is not possible. Thank you for your suggestion, we appreciate it! We will try to implement this behaviour in our component in a future release. Best, Ania

Anna Morawska staff answered 6 years ago


Hi there, for now, it is not possible to change the language in our component, but thank you for reporting this. We will add it to the list of our ideas. Best, Ania

Vladimir Dabic free commented 5 years ago

Hi Anna,

Is it available now?

Best, Vladimir


Jakub Chmura staff commented 5 years ago

Hi @Vladimir Dabic

Yes, it's available. Check our documentation to see how to change labels. https://mdbootstrap.com/docs/react/tables/datatables/

Best regards, Kuba


michael qiang free answered 6 years ago


I updated the parent component with new data, however the MDBDataTable are not refreshed, even if the data in the render method have been updated. Not sure how to make MDBDataTable updated in this case

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.7.1
  • Device: Desktop PC
  • Browser: Chrome
  • OS: Linux
  • Provided sample code: Yes
  • Provided link: Yes