反应本机键盘关闭本身

发布于 2025-01-29 23:28:12 字数 1408 浏览 2 评论 0原文

我看到了类似的错误,因为我尝试了多个版本,但它没有起作用,我尝试安装库的最后一个版本,并遇到了更多问题(此后安装了好版本) 我不知道它来自

return (
<>
  <ImageBackground
    source={require('./assets/images/background.png')}
    style={styles.app}
  > 
    <View style={styles.header}>
      <Text>Pannel des utilisateurs.</Text>
      <Button
        style={styles.deconnect}
        onPress={() => deleteUser()}
        mode="contained">
        Déconnection
      </Button>
    </View>
    <View style={styles.textSearch}>
      <TextInput
        onChangeText={onChangeText}
        value={text}
        placeholder={"Search ... "}
        keyboardType="default"
      />
    </View>
    <SafeAreaView style={{flex: 1}}>
      <FlatList
      data={[...users].sort((a, b) => {
        return (
          (b.surname+b.name+b.email+(b.confirmed?"confirmé":"pas confirmé")+b.phone+b.role.name).toLowerCase().includes(text.toLowerCase()) -
          (a.surname+a.name+a.email+(a.confirmed?"confirmé":"pas confirmé")+a.phone+a.role.name).toLowerCase().includes(text.toLowerCase())
        );
      })}
      style={styles.data}
      numColumns={1}
      renderItem={render}
      keyExtractor={(item,index)=>index.toString()}
      />
    </SafeAreaView>
  </ImageBackground>     
</>

strapi的连接页面,甚至是分类工作如果我不单击UI上的其他内容(例如按钮),它将不会再次打开

I've saw similar error because of react-native-screens, I tried multiple versions and it didn't worked, I tried to install last versions of my libraries and got even more problem (Installed the good version back after that)
I don't get where it come from

return (
<>
  <ImageBackground
    source={require('./assets/images/background.png')}
    style={styles.app}
  > 
    <View style={styles.header}>
      <Text>Pannel des utilisateurs.</Text>
      <Button
        style={styles.deconnect}
        onPress={() => deleteUser()}
        mode="contained">
        Déconnection
      </Button>
    </View>
    <View style={styles.textSearch}>
      <TextInput
        onChangeText={onChangeText}
        value={text}
        placeholder={"Search ... "}
        keyboardType="default"
      />
    </View>
    <SafeAreaView style={{flex: 1}}>
      <FlatList
      data={[...users].sort((a, b) => {
        return (
          (b.surname+b.name+b.email+(b.confirmed?"confirmé":"pas confirmé")+b.phone+b.role.name).toLowerCase().includes(text.toLowerCase()) -
          (a.surname+a.name+a.email+(a.confirmed?"confirmé":"pas confirmé")+a.phone+a.role.name).toLowerCase().includes(text.toLowerCase())
        );
      })}
      style={styles.data}
      numColumns={1}
      renderItem={render}
      keyExtractor={(item,index)=>index.toString()}
      />
    </SafeAreaView>
  </ImageBackground>     
</>

There is only a connection page for strapi that work and even the sorting work but I don't know why since 2days It close itself or I need to spam it to keep it open then after closing it manualy It doesn't open again if I don't click something else on the UI (like a button)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

维持三分热 2025-02-05 23:28:12

似乎PaddingBottom在您点击时会使TextInput自行关闭。
我认为这不是正常的事情,但是将其删除以解决问题

It seem that paddingbottom make the TextInput close itself when you tap in.
I don't think it's normal thing but removing it for a margin resolved the problem

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文