create flow
This commit is contained in:
@@ -19,6 +19,13 @@ const Goals = ({
|
||||
const selected = selectedProp ?? internalSelected;
|
||||
const setSelected = setSelectedProp ?? setInternalSelected;
|
||||
|
||||
const handleOtherObjectiveChange = (value) => {
|
||||
setOtherObjective?.(value);
|
||||
if (value?.trim()?.length && selected != null) {
|
||||
setSelected(null);
|
||||
}
|
||||
};
|
||||
|
||||
// Selection handled by ListSelection
|
||||
|
||||
return (
|
||||
@@ -41,7 +48,7 @@ const Goals = ({
|
||||
label="Tu as un autre objectif?"
|
||||
placeholder="Décrire l’objectif"
|
||||
value={otherObjective}
|
||||
setValue={setOtherObjective}
|
||||
setValue={handleOtherObjectiveChange}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user