-
-
Notifications
You must be signed in to change notification settings - Fork 928
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(SelectPicker): prevent error when listProps.itemSize is a number (#…
- Loading branch information
1 parent
abc2bfe
commit 151df47
Showing
3 changed files
with
41 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import React from 'react'; | ||
import { render } from '@testing-library/react'; | ||
import List from '../List'; | ||
|
||
describe('List', () => { | ||
it('Should not throw when `itemSize` is a number', () => { | ||
expect(() => { | ||
render( | ||
// FIXME-Doma `itemCount` and `height` props are not declared in List's props, | ||
// but they're actually required by react-window List | ||
<List itemSize={66} {...{ itemCount: 1, height: 400 }}> | ||
{() => null} | ||
</List> | ||
); | ||
}).to.not.throw(); | ||
}); | ||
}); |
151df47
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.
Successfully deployed to the following URLs:
rsuite-nextjs – ./docs
rsuite-nextjs-git-main-rsuite.vercel.app
rsuite.vercel.app
rsuite-nextjs-rsuite.vercel.app
rsuitejs.com