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

Add pagination support to Select component #1316

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ericreis
Copy link
Contributor

@ericreis ericreis commented Sep 3, 2020

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)
  • 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 ericreis requested review from vlaux and a team September 3, 2020 00:34
@ericreis ericreis requested a review from a team as a code owner September 3, 2020 00:34
@ericreis ericreis self-assigned this Sep 3, 2020
@vercel
Copy link

vercel bot commented Sep 3, 2020

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

@codesandbox-ci
Copy link

codesandbox-ci bot commented Sep 3, 2020

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 585bb7c:

Sandbox Source
vtex-styleguide-pr Configuration

@kevinch
Copy link
Contributor

kevinch commented Oct 21, 2020

Are the options searchable via the input when not loaded?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants