callstack / callstack/react-native-paper

TextInput outlined strange behavior on tablet

未关闭
#3,808 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

bug TextInput
主要语言
TypeScript
星标
14.5k
派生
2.2k
平均合并
5 天 23 小时
30 天内合并 PR
12

描述

Current behaviour

As you can see from the image, when using it on a tablet, that line above appears under the label.

Expected behaviour

image

How to reproduce?
        <TextInput
          dense
          mode="outlined"
          label="Dish"
          placeholder="Dish"
          keyboardType="phone-pad"
          maxLength={3}
          value={value}
          onChangeText={setValue}
          onSubmitEditing={({ nativeEvent: { text } }) => {
            setValue('');
            if (text === '' || isNaN(text)) return;
            addNumber(text);
          }}
          theme={{
            colors: {
              placeholder: isDark ? '#FFFFFF' : '#000',
              text: '#1E90FF',
              primary: '#1E90FF',
              background: isDark ? '#1B1A23' : "#EFEFEF"
            },
          }}
          style={[
            {
              width: 60,
            },
          ]}
        />
Preview

Tablet:
image

Smartphone:
image

Your Environment
software version
android 8.1.0
react-native 0.71.4
react-native-paper 5.6.0
node 16.14.2
npm 9.6.2

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先,在平板电脑上复现所提供的 outlined TextInput 示例,并将其渲染结果与智能手机截图进行比较。从该用法入手追踪 TextInput 的 outlined 模式,并确定为什么标签下方会出现这条线;当平板电脑上的渲染结果与预期的 outlined 外观一致时,工作即完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
react-native
领域
mobile
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。