-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(stark-ui): table - Add support to show rows counter #1285
feat(stark-ui): table - Add support to show rows counter #1285
Conversation
8b7c7b4
to
7612988
Compare
7612988
to
fdaba0d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
packages/stark-ui/src/modules/table/components/table.component.spec.ts
Outdated
Show resolved
Hide resolved
packages/stark-ui/src/modules/table/components/table.component.spec.ts
Outdated
Show resolved
Hide resolved
About the number to show, I also think we should show the number of displayed rows. In fact, we are already taking that into account to update the total pages in the pagination... |
0d983a6
to
351f428
Compare
@cnomes @christophercr I updated my PR. Could you please have a look ? 😊 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One small remark.
Another thing although not related to this PR. Could you adapt the example of the "Table with fixed header" to pass a pagination config with itemsPerPage: 10
? Otherwise the table is too small so the scroll bars are not shown which makes the "fixed header" feature not to be showcased :(
.stark-table-rows-counter { | ||
flex: 1; | ||
text-align: center; | ||
line-height: 35px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep', it's OK for me. I took the value we had before.
ISSUES CLOSED: #1244
351f428
to
bdad94f
Compare
@christophercr PR updated 😊 |
ISSUES CLOSED: #1244
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
There is no rows counter available in the table component.
It was the case in the previous implementation of Stark.
Issue Number: #1244
What is the new behavior?
Provide optional rows counter in the table component.
Does this PR introduce a breaking change?
Other information
@christophercr I hesitate about the number to show...
Here, I display
{{ data.length }}
, as it was the case in the previous implementation, but we could display{{ dataSource.data.length }}
which represents the displayed rows (in case of filtering).What do you think we should use ?
(I have the feeling we should display
{{ dataSource.data.length }}
)