Topic: MDBDataTable display preselected rows

tnhnet priority asked 3 months ago


Hi,

Is it possible to display pre-selected rows checkboxes on component load ?if so can you help me figure how to do this ?

Please factor the scenario where pagination occurs in your solution.

thank you!


Bartosz Cylwik staff answered 3 months ago


Hi, If I understand correctly, you want some of the rows to be selected after component is mounted. MDBDatatable doesn''t have method like that but you can achieve it by finding the row you want with document.querySelector and then dispatching change event for picked checkbox. Please check my snippet to see how i did it.

Best Regards!



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: Priority
  • Premium support: Yes
  • Technology: MDB Vue
  • MDB Version: MDB5 3.0.0
  • Device: Any
  • Browser: Any
  • OS: Any
  • Provided sample code: No
  • Provided link: No