-
Notifications
You must be signed in to change notification settings - Fork 16
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(components/switcher): fix async support for selected switcher #1476 #1839
Conversation
Visit the preview URL for this PR (updated for commit 318395f): https://prizm-v4--pr1839-fix-switcher-input-o-l026me23.web.app (expires Mon, 15 Jul 2024 10:48:38 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 7c62ed8dbabf5e2d6b2084ca9e107cc206d30dbd |
39cac6c
to
8f1f3d8
Compare
libs/components/src/lib/components/switcher/switcher.component.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
takeUntil(this.destroy$) | ||
) | ||
.subscribe(([switchers, selectedSwitcherIdx]) => { | ||
if (!switchers.length) return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Может вот эту логику перенести в tap до takeUntil
Сомтреть код в tap бывает удобно, а то у нас тут получилось что есть один тап потом часть в subscribe
https://blog.angulartraining.com/three-reasons-to-use-the-tap-operator-from-rxjs-6828fcf288ec
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Хороший поинт, спасибо!
06b1554
to
cc08d66
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
cc08d66
to
6b41df0
Compare
fix(components/switcher): fix async support for selected switcher #1476
fix(components/switcher): add async example for issue #1476
Библиотека
@prizm-ui/components
@prizm-ui/install
@prizm-ui/icons
@prizm-ui/theme
Компонент
Switcher
Задача
resolved #1476
Изменения
Checklist:
Следует обратить внимание на ревью
Установка и смена выбранного элемента в свитчере и компонентах, его содержащих (крон etc)