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

fix(modal-header): use Header's onClose prop #1181

Merged
merged 2 commits into from
Apr 27, 2024

Conversation

Rinta01
Copy link
Contributor

@Rinta01 Rinta01 commented Apr 24, 2024

Use ModalHeader's own onClose prop. If it doesn't exist, use onClose from Modal component

Опишите проблему

Не работает пропса onClose в ModalHeader, вместо нее ВСЕГДА используется onClose из ModalContext.

Ожидаемое поведение

Пропса onClose должна использоваться и иметь приоритет перед onClose из ModalContext

Copy link

changeset-bot bot commented Apr 24, 2024

🦋 Changeset detected

Latest commit: 2b7a115

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 16 packages
Name Type
@alfalab/core-components-modal Patch
@alfalab/core-components-calendar Patch
@alfalab/core-components-select Patch
@alfalab/core-components-calendar-input Patch
@alfalab/core-components-calendar-range Patch
@alfalab/core-components-calendar-with-skeleton Patch
@alfalab/core-components-date-range-input Patch
@alfalab/core-components-date-time-input Patch
@alfalab/core-components-custom-picker-button Patch
@alfalab/core-components-input-autocomplete Patch
@alfalab/core-components-international-phone-input Patch
@alfalab/core-components-intl-phone-input Patch
@alfalab/core-components-picker-button Patch
@alfalab/core-components-select-with-tags Patch
@alfalab/core-components-table Patch
@alfalab/core-components-tabs Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coveralls
Copy link

coveralls commented Apr 24, 2024

Pull Request Test Coverage Report for Build 8830663524

Details

  • 5 of 6 (83.33%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.007%) to 84.567%

Changes Missing Coverage Covered Lines Changed/Added Lines %
packages/modal/src/components/header/Component.tsx 5 6 83.33%
Totals Coverage Status
Change from base Build 8800931717: -0.007%
Covered Lines: 9474
Relevant Lines: 10361

💛 - Coveralls

@core-ds-bot
Copy link
Collaborator

Собрана новая демка.

@@ -41,7 +41,7 @@ export const Header: FC<HeaderProps> = ({
sticky={sticky}
view={view}
title={title}
onClose={onClose}
onClose={restProps.onClose ?? onClose}
Copy link
Contributor

@reme3d2y reme3d2y Apr 25, 2024

Choose a reason for hiding this comment

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

Стоит создать handleClose и в нем вызывать оба этих обработчика

@Valeri8888
Copy link
Collaborator

нужен сhangesets

@core-ds-bot
Copy link
Collaborator

Собрана новая демка.

@Valeri8888 Valeri8888 merged commit 8d8d8ff into master Apr 27, 2024
7 checks passed
@Valeri8888 Valeri8888 deleted the fix/modal-header-on-close branch April 27, 2024 12:14
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.

None yet

7 participants