Skip to content
This repository was archived by the owner on Apr 27, 2021. It is now read-only.

Don't show pagination bar if pagination-data is not emitted#59

Open
BrockReece wants to merge 7 commits intomasterfrom
datatable-no-pagination
Open

Don't show pagination bar if pagination-data is not emitted#59
BrockReece wants to merge 7 commits intomasterfrom
datatable-no-pagination

Conversation

@BrockReece
Copy link
Copy Markdown
Collaborator

Updates to the datagrid wrapper component to only show the pagination bar if there is pagination data emitted from the the root datagrid component. As requested in https://github.com/CroudSupport/cc-vuejs-monorepo/pull/43

Can anyone see any issues with this?
I will need to pass this by product, update the docs and the tests before this gets merged in.

refs #58

@kingy04
Copy link
Copy Markdown
Contributor

kingy04 commented Mar 20, 2018

What happens when the page size starts at 1 but becomes more than 1? will it render the show the pagination bar at that point?

@BrockReece
Copy link
Copy Markdown
Collaborator Author

This doesn't care about the pagination data as such, it only cares about whether the datagrid component emits any pagination data.

In your example above, the pagination data will still be emitted, even if it only has a single page of results, and the pagination bar will show and reflect this.

A possible use case for this would be passing through a local dataset, the datagrid component will not emit pagination data in this case and so the pagination bar will not show.

Does that make sense?

@kingy04
Copy link
Copy Markdown
Contributor

kingy04 commented Mar 20, 2018

Yep, it does thanks.. looks good so far.

@BrockReece
Copy link
Copy Markdown
Collaborator Author

Test coverage added for this component and docs updated to include a local data use case with the pagination bar hidden.

If we are happy with this I will show Product this afternoon.

@BrockReece BrockReece changed the title WIP: Don't show pagination bar if pagination-data is not emitted Don't show pagination bar if pagination-data is not emitted Mar 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants