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(TreeList): new useList family component #1417

Merged
merged 7 commits into from
Mar 18, 2024

Conversation

IsaevAlexandr
Copy link
Contributor

  • added new component;
  • replaced list render method in TreeSelect component;
  • grouped onItemClick callback arguments;

@gravity-ui-bot
Copy link
Contributor

Playwright Test Component is ready.

@gravity-ui-bot
Copy link
Contributor

Preview is ready.

src/components/TreeList/TreeList.scss Outdated Show resolved Hide resolved
src/components/TreeList/__stories__/TreeList.stories.tsx Outdated Show resolved Hide resolved
Comment on lines 32 to 33
renderItem: propsRenderItem,
renderContainer = TreeListContainer,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion: rename renderContainer to containerSlot and move renderItem to the children

Copy link
Contributor Author

Choose a reason for hiding this comment

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

these are two different possibilities. For most tasks, you don't need to redefine the container

src/components/TreeList/types.ts Outdated Show resolved Hide resolved
src/components/TreeSelect/TreeSelect.tsx Outdated Show resolved Hide resolved
@IsaevAlexandr IsaevAlexandr force-pushed the feat-tree-list-component branch from b636f1c to a04fe77 Compare March 16, 2024 15:48
@IsaevAlexandr IsaevAlexandr requested a review from Raubzeug as a code owner March 16, 2024 15:48
@IsaevAlexandr
Copy link
Contributor Author

/fixed

@IsaevAlexandr IsaevAlexandr force-pushed the feat-tree-list-component branch from a04fe77 to d6ebede Compare March 18, 2024 10:21
/**
* Add active styles and change selection behavior during dnd is performing
*/
isDragging?: boolean;
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's call dragging like other states with no is*

@IsaevAlexandr IsaevAlexandr merged commit 5e7d8b9 into gravity-ui:main Mar 18, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants