Skip to content

Commit

Permalink
fix(Pagination): select dropdown menu position error on scrolling
Browse files Browse the repository at this point in the history
  • Loading branch information
jinli.lyy committed Dec 25, 2018
1 parent b07f5ac commit 70375c1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/pagination/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@

&-size-selector {
display: inline-block;

position: relative;
&-title {
margin-right: $pagination-size-selector-title-margin-right;
color: $pagination-size-selector-title-color;
Expand Down
11 changes: 8 additions & 3 deletions src/pagination/pagination.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ class Pagination extends Component {
{icon}
{shape === 'arrow-only' ||
shape === 'arrow-prev-only' ||
shape === 'no-border' ? '' : locale.prev}
shape === 'no-border' ? '' : locale.prev}
</Button>
);
}
Expand Down Expand Up @@ -446,6 +446,9 @@ class Pagination extends Component {
return (
<Select className={`${prefix}pagination-size-selector-dropdown`}
popupClassName={`${prefix}pagination-size-selector-popup`}
popupContainer={node => {
return node.parentNode;
}}
autoWidth
size={size}
value={currentPageSize}
Expand Down Expand Up @@ -518,8 +521,10 @@ class Pagination extends Component {
}
case 'normal': {
const pageList = this.renderPageList(currentPage, totalPage);
const pageDisplay = showJump && total > pageSize * pageShowCount ? this.renderPageDisplay(currentPage, totalPage) : null;
const pageJump = showJump && total > pageSize * pageShowCount ? this.renderPageJump(currentPage, totalPage) : null;
const pageDisplay = showJump && total > pageSize * pageShowCount ?
this.renderPageDisplay(currentPage, totalPage) : null;
const pageJump = showJump && total > pageSize * pageShowCount ?
this.renderPageJump(currentPage, totalPage) : null;
return buildComponent(pageFirst, pageList, pageLast, pageDisplay, ...pageJump);
}
default:
Expand Down

0 comments on commit 70375c1

Please sign in to comment.