-
Notifications
You must be signed in to change notification settings - Fork 870
Replace EuiObserver abstract class with useObserver hook
#9511
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
base: main
Are you sure you want to change the base?
Changes from 10 commits
cb2a356
9fe935c
1eba9ef
466b6a2
0baf169
1d4b872
da96704
daef143
6c0a6d9
5628050
01cf1c6
0f82619
8a861a2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| - Replaced `EuiObserver` abstract base class with a `useObserver` hook |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -508,7 +508,7 @@ describe('EuiPopover', () => { | |
| expect(activeAnimationFrames.size).toEqual(1); | ||
|
|
||
| unmount(); | ||
| expect(window.clearTimeout).toHaveBeenCalledTimes(9); | ||
| expect(window.clearTimeout).toHaveBeenCalledTimes(8); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it expected that clearTimeout is called 8 times and not 9?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, this is expected and intentional. The count dropped from 9 → 8 because the old
Each The new This is the correct behavior — cleaning up once is better than twice, and the count change reflects that improvement. |
||
| expect(cafSpy).toHaveBeenCalledTimes(1); | ||
| expect(activeAnimationFrames.size).toEqual(0); | ||
|
ragini-pandey marked this conversation as resolved.
|
||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.