CNV-39727: fix pagination on bootablevolume selection #1930
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📝 Description
When selecting a bootable volume in instancetype VM creation, the list pagination gets on the first page.
This because we are using the unsorted list to calculate in which page we should be.
Why we do that? Because user can select the bootablevolume from a modal clicking on 'Show all' bootable volume. And clicking on 'select' should change the list page into the current selection page.
So we need a sorted array for identify the right page in which the selection is and a sortedPaginated array to show just the paginated volumes that we want in the list
Another fix:
TabModal expect a submit method that return a promise. So just return a promise.resolve instead of changing the type.
Just changing the type result into an infinite button loading in the modal .