Browse Source

Fix group accordions expanding incorrectly

Arnaud Vergnet 3 years ago
parent
commit
346b00defd

+ 0
- 2
src/components/Lists/PlanexGroups/GroupListAccordion.tsx View File

@@ -34,7 +34,6 @@ type PropsType = {
34 34
   onGroupPress: (data: PlanexGroupType) => void;
35 35
   onFavoritePress: (data: PlanexGroupType) => void;
36 36
   currentSearchString: string;
37
-  height: number;
38 37
   theme: ReactNativePaper.Theme;
39 38
 };
40 39
 
@@ -101,7 +100,6 @@ class GroupListAccordion extends React.Component<PropsType> {
101 100
         <AnimatedAccordion
102 101
           title={item.name.replace(REPLACE_REGEX, ' ')}
103 102
           style={{
104
-            height: props.height,
105 103
             justifyContent: 'center',
106 104
           }}
107 105
           left={(iconProps) =>

+ 0
- 4
src/screens/Planex/GroupSelectionScreen.tsx View File

@@ -27,8 +27,6 @@ import WebSectionList from '../../components/Screens/WebSectionList';
27 27
 import GroupListAccordion from '../../components/Lists/PlanexGroups/GroupListAccordion';
28 28
 import AsyncStorageManager from '../../managers/AsyncStorageManager';
29 29
 
30
-const LIST_ITEM_HEIGHT = 70;
31
-
32 30
 export type PlanexGroupType = {
33 31
   name: string;
34 32
   id: number;
@@ -127,7 +125,6 @@ class GroupSelectionScreen extends React.Component<PropsType, StateType> {
127 125
           onGroupPress={this.onListItemPress}
128 126
           onFavoritePress={this.onListFavoritePress}
129 127
           currentSearchString={currentSearchString}
130
-          height={LIST_ITEM_HEIGHT}
131 128
         />
132 129
       );
133 130
     }
@@ -311,7 +308,6 @@ class GroupSelectionScreen extends React.Component<PropsType, StateType> {
311 308
         fetchUrl={GROUPS_URL}
312 309
         renderItem={this.getRenderItem}
313 310
         updateData={state.currentSearchString + state.favoriteGroups.length}
314
-        itemHeight={LIST_ITEM_HEIGHT}
315 311
       />
316 312
     );
317 313
   }

Loading…
Cancel
Save