Issue with Checkbox in MDBDataTable using Pagination in it


Topic: Issue with Checkbox in MDBDataTable using Pagination in it

rashesh patel asked a year ago

Hi,

Using checkbox in 'MDBDataTable' with pagination there is one issue with it... When I click on checkbox of a particular position of data table (For example 1st row of the data table) of 1st page, than checkbox of all other pages automatically selected at same position.

Means if I check any checkbox of any row of any page, its automatically checked same position(row) of all other pages.

Please refer Images below....

checkbox_1

1) In image one I have select 1st row of the table of page 1...

checkbox_2

2) In image Two Checkbox of 1st row of data table automatically checked of page 2...

How to resolve this issue??


Piotr Glejzer staff commented a year ago

Hello,

I see your problem but we don't have an example with checkboxes in our react docs so we can't help with this now. I added to our task this problem to check it ad fix it ( and also add to our docs example with checkboxes ). Do you have some example with code to show? You can use our snippets if it will be work.
https://mdbootstrap.com/snippets/

Best,
Piotr


rashesh patel commented a year ago

Hi Piotr, 1) Please Let me know after fix it. 2) Sorry I don't have any example right now... 3) One more request - Please also add example of 'Select/Deselect all checkbox' of Data table by selecting one header checkbox.

Thank you.


Piotr Glejzer staff commented a year ago

Ok, I added your another request to our list. Thanks. Have a nice day!


vivek manavadariya commented 11 months ago

Hello i got the same problem anyone find the solution for this ?


Piotr Glejzer staff commented 11 months ago

I think it is resolved, which version do you use?


vivek manavadariya commented 11 months ago

i used 4.23.0 version


Piotr Glejzer staff commented 11 months ago

May you check the version 23.1 or 24? I think it is resolved but if this problem still exists let me know about that.


vivek manavadariya commented 11 months ago

@Piotr Glejzer can we set the rowlimit how many records we show like 5,10,15 this is possible ?


vivek manavadariya commented 11 months ago

i check this i upgrade the version 24 still i get the same issue for checkbox in pagination.


vivek manavadariya commented 11 months ago

@Piotr Glejzer hello i check this i upgrade the version 24 still i get the same issue for checkbox in pagination.


Piotr Glejzer staff answered 11 months ago

if you want to have different entries you have to add a prop entriesOptions like that.

  <MDBDataTable
    striped
    bordered
    hover
    entriesOptions={['5', '10', '15']}
    data='https://my-json-server.typicode.com/Rotarepmi/exjson/db'
  />

If this bug is not fixed yet I will fix this as soon as possible because I thought that our team fixed it before.. Sorry about that. Have a nice day.


vivek manavadariya commented 11 months ago

@Piotr Glejzer hello thanks for replay this problem solve in next version or let you know because this issue show in my website and i can't publish my website it's urgent for me it is possible you let us know via email ?


Piotr Glejzer staff commented 11 months ago

This issue we will solve probably in the next release. I can't give you ETA for this. We don't have an example DataTable with checkboxes in our documentation.


harmis answered 10 months ago

@Piotr Glejzer i give you the link where you can see the actual issue in datatble with pagination.

Link: https://afkar-staging.sharedt.com/#/client/datatable-demo


Piotr Glejzer staff commented 10 months ago

Yea sure, you are using static checkboxes. You probably need to use a state to manipulate data or did you use it?.

We discussed that example ( datatable with checkboxes ) and we will not add this example now. We are waiting for some specifications about our components and we will re-write it.


harmis commented 10 months ago

@Piotr Glejzer i used static checkbox and i pass value is dynamic so when i click on checkbox i just get the checkbox value for delete or update the record that's it. if you need the code then i pasted here link : https://github.com/mdbootstrap/React-Bootstrap-with-Material-Design/issues/97


Piotr Glejzer staff commented 10 months ago

Thank you, if we will re write oiur component, we will look into that.


harmis commented 10 months ago

@Piotr Glejzer can you tell me this issue fixed in next release or i changed another library for datatable because now my website is live and my users are not work propely so we have stuck now and we are not able to manage our users we have in big issue.


Piotr Glejzer staff commented 10 months ago

We will not fix this in the next release. We don't have an example with checkboxes in our docs. This is a task for the future release and we don't have an ETA for that. Sorry about that.


Please insert min. 20 characters.
Status

Answered

Specification of the issue
  • User: Free
  • Premium support: No
  • Technology: React
  • MDB Version: 4.18.1
  • Device: Laptop
  • Browser: Chrome
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: No
Tags