Skip to content
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

fix: list view (#565) #566

Merged
merged 2 commits into from
Dec 14, 2023
Merged

fix: list view (#565) #566

merged 2 commits into from
Dec 14, 2023

Conversation

tomicvladan
Copy link
Collaborator

Drive list view fix #565

const endIndex = startIndex + rowsPerPage;

const folderLength = directories.length;
const folderStartIndex =
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const folderStartIndex = Math.min(page * rowsPerPage, folderLength);

const folderLength = directories.length;
const folderStartIndex =
page * rowsPerPage > folderLength ? folderLength : page * rowsPerPage;
const folderEndIndex =
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const folderEndIndex = Math.min(folderStartIndex + rowsPerPage, folderLength);

Copy link
Contributor

@tamas6 tamas6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested, for me the list view/grid view worked as expected but the "sort" button did nothing when in list view, only when in grid . 🧐

@tomicvladan
Copy link
Collaborator Author

I made a fix for sorting, so now it's working, but the component should be fixed later not to mutate state directly.

@tfius tfius merged commit 130a48d into master Dec 14, 2023
2 checks passed
@tfius tfius deleted the fix/list-view branch December 14, 2023 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

List view is not working properly
4 participants