zahmis 5 лет назад
Родитель
Сommit
cb47b2a59e

+ 3 - 2
src/client/js/components/PageAttachment.jsx

@@ -14,10 +14,11 @@ class PageAttachment extends React.Component {
 
   constructor(props) {
     super(props);
-    // TODO add paging size (limit) for modal
+
+    const { appContainer } = this.props;
     this.state = {
       activePage: 1,
-      limit: 10,
+      limit: appContainer.getConfig().pageLimitationS,
       totalAttachments: 0,
       attachments: [],
       inUse: {},

+ 1 - 1
src/client/js/components/PageList.jsx

@@ -18,7 +18,7 @@ const PageList = (props) => {
 
   const [activePage, setActivePage] = useState(1);
   const [totalPages, setTotalPages] = useState(0);
-  const [limit, setLimit] = useState(appContainer.getConfig().recentCreatedLimit);
+  const [limit, setLimit] = useState(appContainer.getConfig().pageLimitationS);
   const [offset, setOffset] = useState(0);
 
   function setPageNumber(selectedPageNumber) {

+ 1 - 1
src/client/js/components/PageTimeline.jsx

@@ -21,7 +21,7 @@ class PageTimeline extends React.Component {
     this.state = {
       activePage: 1,
       totalPageItems: 0,
-      limit: appContainer.getConfig().recentCreatedLimit,
+      limit: appContainer.getConfig().pageLimitationS,
 
       // TODO: remove after when timeline is implemented with React and inject data with props
       pages: this.props.pages,