balibabu
commited on
Commit
·
f59e210
1
Parent(s):
7f58321
fix: display total items on chunk list page #900 (#1584)
Browse files### What problem does this PR solve?
fix: display total items on chunk list page #900
### Type of change
- [x] Bug Fix (non-breaking change which fixes an issue)
web/src/pages/add-knowledge/components/knowledge-chunk/index.tsx
CHANGED
@@ -203,6 +203,12 @@ const Chunk = () => {
|
|
203 |
current={pagination.current}
|
204 |
size={'small'}
|
205 |
total={total}
|
|
|
|
|
|
|
|
|
|
|
|
|
206 |
/>
|
207 |
</div>
|
208 |
</Flex>
|
|
|
203 |
current={pagination.current}
|
204 |
size={'small'}
|
205 |
total={total}
|
206 |
+
showTotal={(total) => (
|
207 |
+
<Space>
|
208 |
+
{t('total', { keyPrefix: 'common' })}
|
209 |
+
{total}
|
210 |
+
</Space>
|
211 |
+
)}
|
212 |
/>
|
213 |
</div>
|
214 |
</Flex>
|
web/src/pages/add-knowledge/components/knowledge-chunk/model.ts
CHANGED
@@ -29,6 +29,7 @@ const model: DvaModel<ChunkModelState> = {
|
|
29 |
chunkInfo: {},
|
30 |
documentInfo: {} as IKnowledgeFile,
|
31 |
pagination: {
|
|
|
32 |
current: 1,
|
33 |
pageSize: 10,
|
34 |
},
|
@@ -68,6 +69,7 @@ const model: DvaModel<ChunkModelState> = {
|
|
68 |
pagination: {
|
69 |
current: 1,
|
70 |
pageSize: 10,
|
|
|
71 |
},
|
72 |
searchString: '',
|
73 |
available: undefined,
|
|
|
29 |
chunkInfo: {},
|
30 |
documentInfo: {} as IKnowledgeFile,
|
31 |
pagination: {
|
32 |
+
total: 0,
|
33 |
current: 1,
|
34 |
pageSize: 10,
|
35 |
},
|
|
|
69 |
pagination: {
|
70 |
current: 1,
|
71 |
pageSize: 10,
|
72 |
+
total: 0,
|
73 |
},
|
74 |
searchString: '',
|
75 |
available: undefined,
|