Skip to content

Commit

Permalink
test: fix onPopupScroll evt is null
Browse files Browse the repository at this point in the history
  • Loading branch information
wanpan11 committed Apr 23, 2024
1 parent 752ca5f commit da3cd0b
Show file tree
Hide file tree
Showing 4 changed files with 747 additions and 690 deletions.
1 change: 0 additions & 1 deletion examples/basic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,6 @@ class Demo extends React.Component {
<TreeNode value="Value 3-2" title="Title 3-2" />
</TreeNode>
</TreeSelect>
,
</div>
);
}
Expand Down
5 changes: 4 additions & 1 deletion tests/Select.props.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,10 @@ describe('TreeSelect.props', () => {
});

it('onPopupScroll', async () => {
const onPopupScroll = jest.fn();
const onPopupScroll = jest.fn(e => {
// Prevents React from resetting its properties:
e.persist();
});
render(
<TreeSelect
open
Expand Down
Loading

0 comments on commit da3cd0b

Please sign in to comment.