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(Select): add selected elements counter on multiple selection #1368

Merged
merged 23 commits into from
Apr 8, 2024

Conversation

Arucard89
Copy link
Contributor

@Arucard89 Arucard89 commented Feb 26, 2024

Based on DATAUI-2111

@gravity-ui-bot
Copy link
Contributor

Playwright Test Component is ready.

@gravity-ui-bot
Copy link
Contributor

Preview is ready.

@Arucard89 Arucard89 marked this pull request as ready for review March 31, 2024 19:18
@Arucard89 Arucard89 requested a review from korvin89 as a code owner March 31, 2024 19:18
@Arucard89 Arucard89 changed the title feat(Select): added selected elements counter on multiple selection feat(Select): add selected elements counter on multiple selection Mar 31, 2024
src/components/Select/__stories__/SelectShowcase.tsx Outdated Show resolved Hide resolved
@@ -148,4 +157,13 @@ export type SelectClearProps = SelectClearIconProps & {
onMouseLeave: (e: React.MouseEvent) => void;
};

export type SelectCounterProps = {
/** number of selected elements to show */
count: number;
Copy link
Contributor

Choose a reason for hiding this comment

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

I suppose it could also be a string

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We use and manage this value only inside our code, so it could be only number in this usage.

https://github.com/gravity-ui/uikit/pull/1368/files#diff-9cb10225f1e530d44628bfef03a4ff5077dbdc94f3a7f7a10ce6fbeeec76b64dR118

Copy link
Contributor

@korvin89 korvin89 Apr 5, 2024

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes we pass this parameter to render props. Ok, let's make it string if it is more convenient)
fb78910

Copy link
Contributor

Choose a reason for hiding this comment

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

No, I suggest to use type string | number to have opportunity to set values 1, 1k an so on

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, remade it) d7ed58c

Copy link
Contributor Author

Choose a reason for hiding this comment

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

return number) 00f69d6

@Arucard89 Arucard89 merged commit 9f6aa9c into main Apr 8, 2024
4 checks passed
@Arucard89 Arucard89 deleted the DATAUI-2111 branch April 8, 2024 09:45
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.

3 participants