styleguide icon indicating copy to clipboard operation
styleguide copied to clipboard

Add pagination support to Select component

Open ericreis opened this issue 3 years ago • 3 comments

What is the purpose of this pull request?

As the title says, this PR aims to add lazy loading with pagination support to our Select component.

What problem is this solving?

Running workspace

In our VTEX promotions admin, we need to allow the users to select which products will have discounts based on the account's sellers. The problem lies when the account has many sellers (2k+) the select starts to behave poorly and lagged.

How should this be manually tested?

  1. Go to https://newpromotionstest--carrefourbr.myvtex.com/admin/promotions/new/
  2. In the Effect section select the Price card
  3. Under affected items mark the Specific products
  4. In the first select choose the option Seller
  5. Browse the seller list with pagination

Screenshots or example usage

paginated-select-example

Types of changes

  • [ ] Bug fix (a non-breaking change which fixes an issue)
  • [x] New feature (a non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)
  • [ ] Requires change to documentation, which has been updated accordingly.

ericreis avatar Sep 03 '20 00:09 ericreis

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/styleguide-core/styleguide/2zkabh86m
✅ Preview: https://styleguide-git-feature-paginated-select.styleguide-core.vercel.app

vercel[bot] avatar Sep 03 '20 00:09 vercel[bot]

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 585bb7c75a8daa68150ef4c63dc1ec13c82c3b4d:

Sandbox Source
vtex-styleguide-pr Configuration

codesandbox-ci[bot] avatar Sep 03 '20 00:09 codesandbox-ci[bot]

Are the options searchable via the input when not loaded?

kevinch avatar Oct 21 '20 13:10 kevinch