question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Table] All option demo display wrong text

See original GitHub issue

When select All option in table pagination(with -1 value) the display text shown 1--1 of x instead of 1-x of x

  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

Display wrong number( -1 ) when select ALL option.

Expected Behavior 🤔

Should display 1-x of x when x is the number of rows

Steps to Reproduce 🕹

Steps:

  1. go to example in https://material-ui.com/components/tables/#custom-pagination-options
  2. select All option in pagination
  3. the text become 1--1 of 13

Context 🔦

Trying to get correct data

Your Environment 🌎

https://material-ui.com/components/tables

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
oliviertassinaricommented, Oct 28, 2020

@JoaoJesus94 Sounds great, we would only need to add a test case to avoid a regression in the future (like we already had) 😃

0reactions
JoaoJesus94commented, Oct 28, 2020

Ok, this sounds fair. We could restore the support of -1, with a test case and description of its support in the prop this time. @JoaoJesus94. What do you think? We could do the same for the prop count, where -1 means “unknown”. For rowsPerPage it could mean “all”.

@oliviertassinari It seems that the changes that @hswimmer suggested will fix it. Regarding prop count I think we don’t need to touch it. -1 already means “unknown”

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Table] All option demo display wrong text #23277 - GitHub
When select All option in table pagination(with -1 value) the display text shown 1--1 of x instead of 1-x of x The issue...
Read more >
Table Options - Bootstrap Table
Detail: All buttons will show text on them. Default: false. Example: show button text. showColumns.
Read more >
Text doesn't display properly - Canva Help Center
Here's how to fix this: Open the design where the text display error is. Select the text box where ☒ or ▯ is....
Read more >
<table>: The Table element - HTML - MDN Web Docs - Mozilla
This attribute defines the space between the content of a cell and its border, displayed or not. If the cellpadding's length is defined...
Read more >
A Complete Guide to the Table Element | CSS-Tricks
The <table> element in HTML is used for displaying tabular data. ... Using our existing simple demo, the top row is all headers....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found