D
D
Demigodd2020-02-05 09:34:11
JavaScript
Demigodd, 2020-02-05 09:34:11

How to solve the problem with showing all Data on the table?

I noted Angular in the tags, but this problem most likely depends on the implementation of functionality and logic.

And so I will try to correct the question briefly and clearly.
The project has tables that show some data (Rows).
This table has the usual Search Input , Pagination List and PerPageSize List
PerPageSize List consists of 10, 50, 100 , and it shows how much data can be shown in the table.

Here comes the hour of the problem.
We decided to add the Show ALL option , if you select this option, then go to the Backend ShowAll option as Nulland will return all data without Filters.

The problem started when it was determined during tests that some places on the site begin to lag when displaying 500+ data.

And we decided to show this option only when the amount of data coming from Backend is less than 500 .

But if you use Search and make it so that there is only one date in the table, then the ShowAll option will appear ( since it is logical that there are less than 500 dates in the table ),
and if you select it and clear the search phrase, all data will be returned (since the option ShowAll was selected) even if their number is 800 for example.

What are some ideas about the functionality of disabling ShowAll options if the data is more than 500.
How can I implement it correctly?
And in general, about the error, I think to solve it this way, with each change in the Search Input , change the request to send the Default Page options .
But it is not guaranteed that in the future the filtering functionality may appear and it will be necessary for it, too, when it changes, to filter by default values.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Arthur, 2020-02-05
@Demigodd

Why not make 500 instead of show all and show it always? All described functionality will work and there will be no problem described

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question