Skip to main content
markdown corrigido
Fonte Link
Syzoth
  • 100,5mil
  • 23
  • 169
  • 361

` TenteiTentei desse jeito, mas não funcionou. Alguma sugestão.

`- {filterUser && filterUser.length > 0 && (

  •     <FlashList
    
  • data={filterUser ?? []}
  • estimatedListSize={{
  • height: 500 * 5,
  • width: Dimensions.get("window").width - 30,
  •       }}
    
  • estimatedItemSize={Dimensions.get("window").width - 30}
  • showsHorizontalScrollIndicator={false}
  • showsVerticalScrollIndicator={false}
  • ItemSeparatorComponent={() => }
  • renderItem={({ item, index }) => (
  •         <TouchableOpacity
    
  • key={index}
  • activeOpacity={0.6}
  • onPress={() => handleMoveToSearch(item.name)}
  • className="flex-row gap-x-2 items-center"
  •         >
    
  •           <SearchSvg />
    
  •           <Text
    
  • className={
  •               "text-sm font-PlusJakartaSans_500Medium text-dark-primary"
    
  •             }
    
  •           >
    
  •             {item.name}
    
  •           </Text>
    
  •         </TouchableOpacity>
    
  •       )}
    
  •     />
    
  •   )}```
    
{filterUser && filterUser.length > 0 && (
         <FlashList
 data={filterUser ?? []}
 estimatedListSize={{
 height: 500 * 5,
 width: Dimensions.get("window").width - 30,
           }}
 estimatedItemSize={Dimensions.get("window").width - 30}
 showsHorizontalScrollIndicator={false}
 showsVerticalScrollIndicator={false}
 ItemSeparatorComponent={() => <View className="h-4" />}
 renderItem={({ item, index }) => (
             <TouchableOpacity
 key={index}
 activeOpacity={0.6}
 onPress={() => handleMoveToSearch(item.name)}
 className="flex-row gap-x-2 items-center"
             >
               <SearchSvg />
               <Text
 className={
                   "text-sm font-PlusJakartaSans_500Medium text-dark-primary"
                 }
               >
                 {item.name}
               </Text>
             </TouchableOpacity>
           )}
         />
       )}

` Tentei desse jeito, mas não funcionou. Alguma sugestão.

`- {filterUser && filterUser.length > 0 && (

  •     <FlashList
    
  • data={filterUser ?? []}
  • estimatedListSize={{
  • height: 500 * 5,
  • width: Dimensions.get("window").width - 30,
  •       }}
    
  • estimatedItemSize={Dimensions.get("window").width - 30}
  • showsHorizontalScrollIndicator={false}
  • showsVerticalScrollIndicator={false}
  • ItemSeparatorComponent={() => }
  • renderItem={({ item, index }) => (
  •         <TouchableOpacity
    
  • key={index}
  • activeOpacity={0.6}
  • onPress={() => handleMoveToSearch(item.name)}
  • className="flex-row gap-x-2 items-center"
  •         >
    
  •           <SearchSvg />
    
  •           <Text
    
  • className={
  •               "text-sm font-PlusJakartaSans_500Medium text-dark-primary"
    
  •             }
    
  •           >
    
  •             {item.name}
    
  •           </Text>
    
  •         </TouchableOpacity>
    
  •       )}
    
  •     />
    
  •   )}```
    

Tentei desse jeito, mas não funcionou. Alguma sugestão.

{filterUser && filterUser.length > 0 && (
         <FlashList
 data={filterUser ?? []}
 estimatedListSize={{
 height: 500 * 5,
 width: Dimensions.get("window").width - 30,
           }}
 estimatedItemSize={Dimensions.get("window").width - 30}
 showsHorizontalScrollIndicator={false}
 showsVerticalScrollIndicator={false}
 ItemSeparatorComponent={() => <View className="h-4" />}
 renderItem={({ item, index }) => (
             <TouchableOpacity
 key={index}
 activeOpacity={0.6}
 onPress={() => handleMoveToSearch(item.name)}
 className="flex-row gap-x-2 items-center"
             >
               <SearchSvg />
               <Text
 className={
                   "text-sm font-PlusJakartaSans_500Medium text-dark-primary"
                 }
               >
                 {item.name}
               </Text>
             </TouchableOpacity>
           )}
         />
       )}
Pergunta fechada como "Precisa de detalhes ou esclarecimentos" por Syzoth
Fonte Link

Estou tendo um aviso na minha FlashList quando ela esta vazia

` Tentei desse jeito, mas não funcionou. Alguma sugestão.

`- {filterUser && filterUser.length > 0 && (

  •     <FlashList
    
  • data={filterUser ?? []}
  • estimatedListSize={{
  • height: 500 * 5,
  • width: Dimensions.get("window").width - 30,
  •       }}
    
  • estimatedItemSize={Dimensions.get("window").width - 30}
  • showsHorizontalScrollIndicator={false}
  • showsVerticalScrollIndicator={false}
  • ItemSeparatorComponent={() => }
  • renderItem={({ item, index }) => (
  •         <TouchableOpacity
    
  • key={index}
  • activeOpacity={0.6}
  • onPress={() => handleMoveToSearch(item.name)}
  • className="flex-row gap-x-2 items-center"
  •         >
    
  •           <SearchSvg />
    
  •           <Text
    
  • className={
  •               "text-sm font-PlusJakartaSans_500Medium text-dark-primary"
    
  •             }
    
  •           >
    
  •             {item.name}
    
  •           </Text>
    
  •         </TouchableOpacity>
    
  •       )}
    
  •     />
    
  •   )}```