Paginating a Table Elements in Bubble

Hey fellow Bubblers !

I love Bubble’s new Table Element. It makes my life so much easier when building Tables.

However, since it’s still in Beta, there a few features missing, such as the pagination !

Which is why I ended up writing a tutorial to create one from scratch.

If you’re interested you can find the article here :point_right: How to paginate a Table Element in Bubble ?

Feel free to let me know what you think :slight_smile:

Happy Bubbling !

4 Likes

Great stuff! followed your instructions and worked like a charm! good work!

1 Like

Hello Thomas! Thank you for your time and efforts to provide us with this awesome tutorial. I finished your tutorial and works perfectly fine, but I was looking to fine-tune the pagination feature.

Do you know how I can add Page numbers like 1, 2, 3, 4, 5 and move according to the active page?

Also, the text 1-25 is not showing number 1 and is only showing 25. I checked and is the same as your tutorial. Am I doing something wrong?

And in the last page, when shows like 2 results instead of 25 in total, still says 25 out of… basically is not counting the remaining results properly.

Appreciate your patience and time!

Best regards to all bubblers!

Are you building an aircraft management app? I built one for my group share ages ago, let me know if you need any pointers for stuff like maintenance / currency tracking!

I have never really touched the table element, but here’s some ideas:

  1. I don’t understand why you have Table Flight’s From - Table Flight’s From. That’s always going to be zero so would be redundant.
  2. Because of the above, simplify your formula to Showing Dropdown’s value out of Search for Flights:count

Now, to solve your problem:

Dropdown’s value < - range - > Search for Flights:count - Table Flight’s From : min

Dropdown’s value is the number per page.

Search for Flights:count - Table Flight’s From is the number of remaining flights.

We put these two values in a range, and take the smallest value which is the number of flights remaining.

So, for Dropdown’s value < - range - > Search for Flights:count - Table Flight’s From : min

Dropdown’s value (15) < - range - > Search for Flights:count (17) - Table Flight’s From (15) : min

That’s 15 < - range - > 2 : min, and of course two is smaller so that’s the result of the expression, and that’s the number of results being displayed. Best of luck!

1 Like

Hello George, thank you for your fast feedback! It’s an app for pilots in general, not for aircraft in specific.

:sweat_smile: well, you are right, no sense.

Well I tried to use your logic and is not allowing me to use “-” after search for flights:count

have any idea?

Once again, really appreciate your time!

Enable expression parentheses in Settings → Versions → Experimental features

2 Likes

For the total number of results (and the number of results being displayed), both numbers are displaying 1 number over the amount for each one. Even in the Table component it has this same issue.

For example instead of 10 - 15, it’s showing 11 - 16

I corrected this by amending the formula on the upper value to have a minus 1. The bit I can’t figure is how to stop banding to stop it going higher than the number records

See below 21-30 out of 24

In case anybody stumbles across this, I realised a way to do this. I used the <-Min-> operator on the 2nd part - comparing the output from each stage with the total number of rows.