Allow objects and string with DataTable paginationLabel


Topic: Allow objects and string with DataTable paginationLabel

Christian Aichner pro premium asked a year ago

Good day,

currently, I am using a JSX object for the MDBDataTable paginationLabel

paginationLabel={[
    <MDBIcon icon="angle-left" size="lg" className="pl-3 pr-3" />,
    <MDBIcon icon="angle-right" size="lg" className="pl-3 pr-3" />
]}

Just recently, I am getting the error message

Warning: Failed prop type: Invalid prop label[0] of type object supplied to DataTablePagination, expected string.

for both items in the array.

Can your typescript implementation be updated to both allow Objects and Strings?

Best regards, Chris


Piotr Glejzer staff commented a year ago

Yes, it is. We will change it. Thanks for a suggestion. Have a nice day.


karthik07rs commented a year ago

Me to facing same problem & showing warnings while importing from child class to parent class.may i know that issue has been fixed ? & let me know the version.


Christian Aichner pro premium commented a year ago

4.25.0 should have fixed this. See changelog here: https://mdbootstrap.com/docs/react/changelog/#v4-25-0


Piotr Glejzer staff commented a year ago

Yes, It should be fixed. Let me know it you have a provlem with that.


Please insert min. 20 characters.
Status

Open

Specification of the issue
  • User: Pro
  • Premium support: Yes
  • Technology: React
  • MDB Version: 4.24.0
  • Device: Desktop
  • Browser: Google Chrome
  • OS: Windows 10 Professional
  • Provided sample code: No
  • Provided link: No