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

feat(component): adds grouping options to Select component #350

Merged
merged 10 commits into from
Apr 2, 2020
Merged

feat(component): adds grouping options to Select component #350

merged 10 commits into from
Apr 2, 2020

Conversation

jordan-massingill
Copy link

@jordan-massingill jordan-massingill commented Mar 24, 2020

Similar to recently updated Dropdown component, adds ability to create groups in a Select component with labels.

Screen Shot 2020-03-26 at 12 32 09 PMScreen Shot 2020-03-26 at 12 31 47 PM

@jordan-massingill jordan-massingill requested a review from a team March 24, 2020 14:40
@jorgemoya
Copy link
Contributor

Not sure why yarn.lock changed if package.json is the same. Any idea?

@rtalvarez
Copy link
Member

Not sure why yarn.lock changed if package.json is the same. Any idea?

My guess is this is the yarn.lock from another branch, that had a modified package.json .. or something like that?

Copy link
Contributor

@jorgemoya jorgemoya left a comment

Choose a reason for hiding this comment

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

Looking good. Not sure why filter isn't working, will need to play with your branch.

packages/big-design/src/components/Select/types.ts Outdated Show resolved Hide resolved
packages/big-design/src/components/Select/Select.tsx Outdated Show resolved Hide resolved
packages/big-design/src/components/Select/Select.tsx Outdated Show resolved Hide resolved
@jordan-massingill jordan-massingill requested review from jorgemoya and a team March 26, 2020 17:28
@jordan-massingill jordan-massingill changed the title feat(component): adds grouping options to Select component WIP feat(component): adds grouping options to Select component Mar 26, 2020
Copy link
Contributor

@chanceaclark chanceaclark left a comment

Choose a reason for hiding this comment

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

Here's some initial feedback. I'll let you fix the infinite rendering issue we discussed offline before providing some more.

packages/big-design/src/components/Select/Select.tsx Outdated Show resolved Hide resolved
packages/big-design/src/components/Select/Select.tsx Outdated Show resolved Hide resolved
packages/big-design/src/components/Select/Select.tsx Outdated Show resolved Hide resolved
packages/big-design/src/components/Select/styled.tsx Outdated Show resolved Hide resolved
packages/big-design/src/components/Select/styled.tsx Outdated Show resolved Hide resolved
packages/big-design/src/components/Select/styled.tsx Outdated Show resolved Hide resolved
packages/big-design/src/components/Select/types.ts Outdated Show resolved Hide resolved
packages/big-design/src/components/Select/styled.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

@chanceaclark chanceaclark left a comment

Choose a reason for hiding this comment

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

Looking good! One comment and a few 🍹 from me.

Copy link
Contributor

@jorgemoya jorgemoya left a comment

Choose a reason for hiding this comment

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

Looks good to me! Great job, thanks for doing this one as well. 🙏

Copy link
Contributor

@chanceaclark chanceaclark left a comment

Choose a reason for hiding this comment

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

Looks good on my end!

Comment on lines +296 to +300
if (
!selectOptions.find(
(option: SelectOption<T> | SelectAction) => 'value' in option && option.value === item.value,
)
) {
Copy link
Contributor

Choose a reason for hiding this comment

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

🍹🍹🍹

Suggested change
if (
!selectOptions.find(
(option: SelectOption<T> | SelectAction) => 'value' in option && option.value === item.value,
)
) {
if (!selectOptions.find(option => 'value' in option && option.value === item.value)) {

@jordan-massingill jordan-massingill merged commit 16a8dd7 into bigcommerce:master Apr 2, 2020
@jordan-massingill jordan-massingill deleted the CHP-6188 branch April 2, 2020 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants