commit 6c38c7090e0aa10135f01cee3cb198dbebeb314e
Author: Schwobik <michal.schwob@seznam.cz>
Date:   Wed May 17 17:38:50 2023 +0200

    ListView fix
    re #10715

diff --git a/src/components/listView/ListView.tsx b/src/components/listView/ListView.tsx
index a5a3015..f64ed77 100644
--- a/src/components/listView/ListView.tsx
+++ b/src/components/listView/ListView.tsx
@@ -23,13 +23,15 @@ const ListView = (props: ListViewProps) => {
                 (inventories.length > 1 ?
                     inventories.map((inventory) => (
                             <ListViewInventoryGroup
-                                inventory={ inventory.label }
+                                inventoryName={ inventory.name }
+                                inventoryLabel={ inventory.label }
                                 navigation={ props.navigation }
                             />
                         )
                     ) : (
                         <ListViewInventoryGroup
-                            inventory={ inventories[0].label }
+                            inventoryName={ inventories[0].name }
+                            inventoryLabel={ inventories[0].label }
                             navigation={ props.navigation }
                             defaultOpen={ true }
                         />
diff --git a/src/components/listView/ListViewInventoryGroup.tsx b/src/components/listView/ListViewInventoryGroup.tsx
index 32afb99..41d0614 100644
--- a/src/components/listView/ListViewInventoryGroup.tsx
+++ b/src/components/listView/ListViewInventoryGroup.tsx
@@ -1,4 +1,4 @@
-import { Badge, Button, Pressable, VStack, Text, Fab } from "native-base"
+import { Badge, Button, Pressable, VStack, Text, Fab, Divider } from "native-base"
 import { ItemPreviewType } from "../../types/listViewTypes"
 import ItemPreview from "./ItemPreview"
 import { useDispatch, useSelector } from "react-redux"
@@ -7,16 +7,17 @@ import { useEffect, useState } from "react"
 import { loadItemsByInventory } from "../../stores/actions/listViewThunks"
 
 interface ListViewInventoryGroupProps {
-    inventory: string
+    inventoryName: string
+    inventoryLabel: string
     navigation: any
     defaultOpen?: boolean
 }
 
 const ListViewInventoryGroup = (props: ListViewInventoryGroupProps) => {
-    const items = useSelector((state: RootState) => state.listView.data[props.inventory])
+    const items = useSelector((state: RootState) => state.listView.data[props.inventoryName])
     const loading = useSelector((state: RootState) => state.listView.loading)
     const [isExpanded, setIsExpanded] = useState(props.defaultOpen ? props.defaultOpen : false)
-    const pagination = useSelector((state: RootState) => state.listView.loadedPages[props.inventory])
+    const pagination = useSelector((state: RootState) => state.listView.loadedPages[props.inventoryName])
 
     const dispatch = useDispatch<AppDispatch>()
 
@@ -65,7 +66,7 @@ const ListViewInventoryGroup = (props: ListViewInventoryGroupProps) => {
     useEffect(() => {
         if (isExpanded) {
             if (!items || items.length == 0) {
-                dispatch(loadItemsByInventory(props.inventory))
+                dispatch(loadItemsByInventory(props.inventoryName))
             }
         }
     }, [isExpanded])
@@ -79,7 +80,7 @@ const ListViewInventoryGroup = (props: ListViewInventoryGroupProps) => {
     useEffect(() => {
         if (props.defaultOpen) {
             if (!items || items.length == 0) {
-                dispatch(loadItemsByInventory(props.inventory))
+                dispatch(loadItemsByInventory(props.inventoryName))
             }
         }
     }, [])
@@ -96,7 +97,7 @@ const ListViewInventoryGroup = (props: ListViewInventoryGroupProps) => {
                     p={ 1 }
                     size={ "md" }
                 >
-                    { props.inventory }
+                    { props.inventoryLabel }
                 </Button>
                 { isExpanded && items && items.map((item) => (
                     <ItemPreview
@@ -111,16 +112,17 @@ const ListViewInventoryGroup = (props: ListViewInventoryGroupProps) => {
                 )) }
                 { isExpanded && items && pagination && pagination.cursor < pagination.records && (
                     <Button
-                        onPress={ () => dispatch(loadItemsByInventory(props.inventory)) }
+                        onPress={ () => dispatch(loadItemsByInventory(props.inventoryName)) }
                         variant={ "Link" }
-                        mt={ 2 }
+                        mt={ 0 }
                         size={ "sm" }
                         color={ "primary.500" }
                         textDecoration={ "underline" }
                     >
-                        <Text fontSize={ "sm" } color={ "primary.6 00" } underline>Load more</Text>
+                        <Text fontSize={ "sm" } color={ "primary.500" } underline>Load more</Text>
                     </Button>
                 ) }
+                <Divider my={ 2 } colorScheme={"primary"} />
 
             </VStack>
         </>
