Using "compact" Picker on iOS in headerTitle component of Stack.Screen pushes it to the left rather than centre
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- javascript, react-native
调研方向
Start by reproducing the issue with the provided Stack.Screen example, which uses DateTimePicker with display="compact" as headerTitle on iOS. Check the repository's iOS picker and navigation examples or tests for header layout behavior. Done means the compact picker remains centered in the header; the issue does not name a specific source file or test.
由索引模型根据 Issue 内容生成。
描述
Question
Hi, I'm using the latest Expo supported version 6.7.3 so hopefully this is fixed in a later version but currently when I attempt to use the picker as the header component of Screen the header get's pushed to the left. With any other combination of controls this isn't the case. Is there a workaround for this or some other approach I can use?
Thanks!
<Stack.Screen
options={{
title: 'Logbook',
headerTitle: () =>
Platform.OS === 'android' ? (
<Button
title={format(date, 'dd/MM/yyyy')}
type="clear"
onPress={handlePress}
buttonStyle={{
backgroundColor: Color(theme.colors.primary)
.alpha(0.2)
.string(),
}}
size="sm"
/>
) : (
<DateTimePicker
value={date}
is24Hour
onChange={handleDateChange}
display="compact"
/>
),
headerRight: () =>
selectedIds.length > 0 && (
<Icon
name="label"
type="material-icons"
color={theme.colors.primary}
onPress={handleClassificationPress}
/>
),
}}
/>
- 主要语言
- JavaScript
- 星标
- 2.9k
- 派生
- 459
- 平均合并
- 4 天 16 小时
- 30 天内合并 PR
- 5
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
react-native-datetimepicker/datetimepicker 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
-
难度 3/5 1-2 天 新手友好度 58/100
react-native-datetimepicker/datetimepicker#1070 · 1 条评论 ·
-
难度 3/5 1-2 天 新手友好度 52/100
-
难度 3/5 1-2 天 新手友好度 55/100
react-native-datetimepicker/datetimepicker#1047 · 6 条评论 ·
-
难度 4/5 3-5 天 新手友好度 20/100
react-native-datetimepicker/datetimepicker#1046 · 1 条评论 ·
查看 react-native-datetimepicker/datetimepicker 的全部 Issue
相似的 Issue
-
Windows flake: withFileLock throws EPERM when the previous holder's lock file is still being deleted未关闭
难度 2/5 1-3 小时 新手友好度 79/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
-
area: agent area: integration lane: strong-agent priority: P2 roadmap size: S type: integration type: task
难度 2/5 1-3 小时 新手友好度 74/100
arminazimi/seaworthy#688 ·
维护者通常 1 天内回复
-
idea-scout idea:245
难度 2/5 1-3 小时 新手友好度 85/100
jeanibarz/agent-notebook#245 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
obsidianmd/obsidian-developer-docs#281 ·
维护者通常 4 天内回复