Skip to content

Commit

Permalink
fix: when next step is deleted, props.value doesn't update (#4034)
Browse files Browse the repository at this point in the history
  • Loading branch information
RODO94 authored Dec 3, 2024
1 parent bc7a818 commit fa6d9d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions editor.planx.uk/src/@planx/components/NextSteps/Editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const TaskEditor: React.FC<ListManagerEditorProps<Step>> = (props) => {
<InputRow>
<Input
name="description"
value={props.value.description}
value={props.value.description || ""}
multiline
onChange={(ev: ChangeEvent<HTMLInputElement>) => {
props.onChange({
Expand All @@ -61,7 +61,7 @@ const TaskEditor: React.FC<ListManagerEditorProps<Step>> = (props) => {
<Input
name="url"
type="url"
value={props.value.url}
value={props.value.url || ""}
onChange={(ev: ChangeEvent<HTMLInputElement>) => {
props.onChange({
...props.value,
Expand Down

0 comments on commit fa6d9d0

Please sign in to comment.