Skip to content

Conversation

@tcnichol
Copy link
Contributor

A fix that has worked for me is to make sure that mine=false when using superadmin mode.

@tcnichol tcnichol linked an issue Jun 10, 2024 that may be closed by this pull request
@tcnichol tcnichol requested review from Vismayak and ddey2 June 10, 2024 19:29
Copy link
Member

@lmarini lmarini left a comment

Choose a reason for hiding this comment

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

  • I think this fixes the listed datasets, but the pagination controls seem to have issues. The number of pages is updated, but I don't think a page is selected
  • What are the changes to open.json for?

@tcnichol
Copy link
Contributor Author

  • I think this fixes the listed datasets, but the pagination controls seem to have issues. The number of pages is updated, but I don't think a page is selected
  • What are the changes to open.json for?

I think open.json got changed when I ran the pre-commit hooks. I can undo that.

Will check page pagination.

@tcnichol tcnichol requested a review from lmarini June 18, 2024 01:27
Copy link
Member

@longshuicy longshuicy left a comment

Choose a reason for hiding this comment

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

Admin mode pagination seems to be fixed.
However, in admin mode when I try to switch to "my dataset" tab, it doesn't allow me to flip pages. When I check the network tab I see double calls to the backend: one with mine=true, the other with mine=false.

image

This might related to the logic you added, when adminMode = True you list the dataset with mine=false

if (adminMode) {
			listDatasets(0, limit, false);

This part.

Copy link
Member

@ddey2 ddey2 left a comment

Choose a reason for hiding this comment

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

Pagination doesn't work on 'My dataset' tab in superadmin mode.
Screenshot 2024-06-24 at 1 45 46 PM

@tcnichol
Copy link
Contributor Author

Pagination doesn't work on 'My dataset' tab in superadmin mode. Screenshot 2024-06-24 at 1 45 46 PM

I think I fixed this.

I was not using the current page num in listDatasets, so it was getting stuck at 0 for admin mode and 'mine.' Now when you switch tabs, it changes 'mine' and 'currentPageNum' and then those are used in the hook to populate the datasets.

@longshuicy
Copy link
Member

@tcnichol whenever you have a chance could you check if this is resolved with your latest change in the PR? Thanks!! #1123

Copy link
Member

@longshuicy longshuicy left a comment

Choose a reason for hiding this comment

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

This is working correctly now. Also it resovled this issue #1123

@longshuicy longshuicy requested a review from ddey2 June 27, 2024 20:35
Copy link
Member

@ddey2 ddey2 left a comment

Choose a reason for hiding this comment

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

Works perfect.

tcnichol and others added 2 commits June 27, 2024 22:18
remove not used inline comment
@longshuicy longshuicy merged commit b000b8c into main Jun 28, 2024
@longshuicy longshuicy deleted the 1098-superamin-messes-up-dataset-pagination branch June 28, 2024 14:00
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.

Superamin messes up dataset pagination

5 participants