Topic: Table - find number of rows that can be displayed ?

davout free asked 3 years ago


I have a MDB table set into a web page where the vertical space available to the table may vary . How can I check how many data rows can be displayed int the available table height? The table has a header row, and a footer row.

I'm looking to...* Calculate the number of data rows that can be displayed in the available table data area (i.e. dataRows = table_data_area_y / rowHeight)* change the paging settings so that 'dataRows' is the new page size

Suggestions?


Arkadiusz Idzikowski staff commented 3 years ago

You can try to use getBoundingClientRect method to get the position of the table on the screen, then compare it with viewport height to get the difference between your table element and viewport bottom.



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Opened

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: 9.3.0
  • Device: PC
  • Browser: Chrome
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: No
Tags