@onehat/ui 0.3.9 → 0.3.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -799,7 +799,7 @@ function GridComponent(props) {
|
|
|
799
799
|
let listFooterComponent = null;
|
|
800
800
|
if (!disableBottomToolbar) {
|
|
801
801
|
if (Repository && bottomToolbar === 'pagination' && !disablePagination && Repository.isPaginated) {
|
|
802
|
-
listFooterComponent = <PaginationToolbar Repository={Repository} toolbarItems={footerToolbarItemComponents} />;
|
|
802
|
+
listFooterComponent = <PaginationToolbar Repository={Repository} toolbarItems={footerToolbarItemComponents} disablePageSize={!disableAdjustingPageSizeToHeight} />;
|
|
803
803
|
} else if (footerToolbarItemComponents.length) {
|
|
804
804
|
listFooterComponent = <Toolbar>{footerToolbarItemComponents}</Toolbar>;
|
|
805
805
|
}
|
|
@@ -17,6 +17,7 @@ import PageSizeCombo from '../Form/Field/Combo/PageSizeCombo.js';
|
|
|
17
17
|
export default function Pagination(props) {
|
|
18
18
|
const {
|
|
19
19
|
minimize = false,
|
|
20
|
+
disablePageSize = false,
|
|
20
21
|
|
|
21
22
|
// withData
|
|
22
23
|
Repository,
|
|
@@ -116,7 +117,7 @@ export default function Pagination(props) {
|
|
|
116
117
|
/>);
|
|
117
118
|
}
|
|
118
119
|
|
|
119
|
-
if (!minimize) {
|
|
120
|
+
if (!minimize && !disablePageSize) {
|
|
120
121
|
items.push(<PageSizeCombo key="pageSize" pageSize={pageSize} Repository={Repository} />);
|
|
121
122
|
}
|
|
122
123
|
|
|
@@ -9,6 +9,7 @@ import _ from 'lodash';
|
|
|
9
9
|
export default function PaginationToolbar(props) {
|
|
10
10
|
const {
|
|
11
11
|
toolbarItems = [],
|
|
12
|
+
disablePageSize = false,
|
|
12
13
|
} = props,
|
|
13
14
|
[minimize, setMinimize] = useState(false),
|
|
14
15
|
propsToPass = _.omit(props, 'toolbarItems'),
|
|
@@ -48,7 +49,7 @@ export default function PaginationToolbar(props) {
|
|
|
48
49
|
w="100%"
|
|
49
50
|
onLayout={(e) => onLayout(e)}
|
|
50
51
|
>
|
|
51
|
-
{showPagination && <Pagination {...propsToPass} w={toolbarItems.length ? null : '100%'} minimize={minimize} />}
|
|
52
|
+
{showPagination && <Pagination {...propsToPass} w={toolbarItems.length ? null : '100%'} minimize={minimize} disablePageSize={disablePageSize} />}
|
|
52
53
|
{toolbarItems.length ? <Row flex={1} {...toolbarProps}>{toolbarItems}</Row> : null}
|
|
53
54
|
</Toolbar>;
|
|
54
55
|
};
|