budibase
budibase copied to clipboard
Data Provider should hide Pagination if Empty.
There should be an option ( or default behavior ) of the Data Provider Component, to hide its Pagination section if it has no rows.

You can set it. Go to properties -> Conditions (all the way down) -> create new -> select Update setting -> Paginate -> set false (untick) -> create condition - data provider rows count < 0 or something like that
hey @martkaczmarek and thanks for the tip !
P.S it seems you cannot create Conditional rule on a Data Provider referencing itself. The bindings aren't available. my Data Provider is called dpAreas. When in Conditional UI, its not available in the list of bindings.
Yeah, I can see now that when I tried it I can't reference the component's self values. You could reference a State which would be updated with data provider's row count, but again - we can't do it automatically. We're seriously lacking:
- Ability to reference other objects' values - either from inside, or outside;
- Ability to run actions on page launch, on data provider refresh, on form elements click (not change) etc. EDIT: As I can see, you also referenced my point 2. in #7818
@poirazis I have an idea for a workaround:
Create two identical data providers, one inside the other. Apply the same filtering and data for both of them, and move your contents to the Child one.
Turn off the pagination in the parent. Create the conditional pagination in the Child. In the child's condition, you can reference the parent row count.
This issue has been automatically marked as stale because it has not had recent activity.