File tree Expand file tree Collapse file tree 8 files changed +6
-5
lines changed
Expand file tree Collapse file tree 8 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -86,10 +86,10 @@ describe('List', () => {
8686 expect ( screen . getByTestId ( 'after' ) ) . toHaveStyle ( `height: ${ height } px;` )
8787 } )
8888
89- test ( 'no height: 100% without windowing' , ( ) => {
89+ test ( 'no "overflow: auto" without windowing' , ( ) => {
9090 renderWithTheme ( < Basic /> )
9191
92- expect ( screen . getByRole ( 'list' ) ) . not . toHaveStyle ( 'height: 100% ' )
92+ expect ( screen . getByRole ( 'list' ) ) . not . toHaveStyle ( 'overflow: auto ' )
9393 } )
9494 } )
9595 describe ( 'color' , ( ) => {
Original file line number Diff line number Diff line change @@ -153,6 +153,7 @@ export const ListInternal = forwardRef(
153153 tabIndex = { - 1 }
154154 role = { role || 'list' }
155155 height = { height }
156+ windowing = { windowing }
156157 { ...props }
157158 { ...navProps }
158159 >
@@ -174,7 +175,7 @@ const ListStyle = styled.ul
174175
175176 list-style: none;
176177 margin: 0;
177- overflow: auto;
178+ ${ ( { windowing } ) => windowing !== 'none' && ' overflow: auto;' }
178179 padding: 0;
179180`
180181
Original file line number Diff line number Diff line change @@ -194,4 +194,4 @@ const TreeLayout: FC<TreeProps> = ({
194194 )
195195}
196196
197- export const Tree = styled ( TreeLayout ) < TreeProps > ``
197+ export const Tree = styled ( TreeLayout ) ``
Original file line number Diff line number Diff line change @@ -81,4 +81,4 @@ const TreeItemLayout: FC<TreeItemProps> = ({
8181 )
8282}
8383
84- export const TreeItem = styled ( TreeItemLayout ) < TreeItemProps > ``
84+ export const TreeItem = styled ( TreeItemLayout ) ``
You can’t perform that action at this time.
0 commit comments