Using "compact" Picker on iOS in headerTitle component of Stack.Screen pushes it to the left rather than centre
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Accessibilité débutants
- 35/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- À l'abandon
- Stack technique
- javascript, react-native
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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}
/>
),
}}
/>
- Langage dominant
- JavaScript
- Étoiles
- 2.9k
- Forks
- 459
- Merge moyen
- 4 j 16 h
- PR mergées (30 j)
- 5
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de react-native-datetimepicker/datetimepicker
-
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
-
Difficulté 3/5 1-2 jours Accessibilité débutants 58/100
react-native-datetimepicker/datetimepicker#1070 · 1 commentaire ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 52/100
-
DateTimePickerAndroid.open() throws "Cannot read property" error on RN 0.78.3 new architectureOuverte
Difficulté 3/5 1-2 jours Accessibilité débutants 55/100
react-native-datetimepicker/datetimepicker#1047 · 6 commentaires ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 20/100
react-native-datetimepicker/datetimepicker#1046 · 1 commentaire ·
Toutes les issues de react-native-datetimepicker/datetimepicker
Issues similaires
-
Administration: required plugin configuration field stays invalid after restoring its saved valueOuverteneeds-triage Platform(Default)
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
Les mainteneurs répondent en général sous 1 jour
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
nearform/ag-grid-url-sync#314 · 1 réaction ·
Les mainteneurs répondent en général sous 1 jour
-
chore
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
idean3885/claude-ops-agent#910 ·
Les mainteneurs répondent en général sous 1 jour
-
S: triage
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
oskarrough/agent-ide#29 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour