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
-
難度 2/5 1-3 小時 新手友好度 83/100
Fei2411/DeepSeek-Bot#1194 ·
-
documentation
難度 2/5 1-3 小時 新手友好度 68/100
andromarces/agent-loops#1735 ·
維護者通常 1 天內回覆
-
automated issue report
難度 2/5 1-3 小時 新手友好度 76/100
維護者通常 1 天內回覆
-
enhancement good first issue help wanted
難度 2/5 1-3 小時 新手友好度 88/100
BinaryBaconLabs/todo-app#32 ·
維護者通常 1 天內回覆
-
Missing assertions to legacy Cafe Menu block tests可能已有人在做 @mariamanbar 今天認領。 未關閉
難度 1/5 1 小時以內 新手友好度 90/100
freeCodeCamp/freeCodeCamp#71624 ·
維護者通常 1 天內回覆