Skip to content

Commit

Permalink
fix: preserve multipart file part position in requestData
Browse files Browse the repository at this point in the history
when providing type string format binary aka file position is not preserved,
because it is not registered on component mount like all others do.
So the state is later on corrupted,
because when the file is set and so a new property will be added to requestData Map in state.
This results in beeing the last property.
since all other properties' components are registering their value on component mount,
the oder is preserved for those.

Signed-off-by: mathis-m <mathis.michel@outlook.de>
  • Loading branch information
mathis-m committed Feb 27, 2021
1 parent 7367c20 commit 7640625
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/json-schema-components.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ export class JsonSchemaForm extends Component {
const { dispatchInitialValue, value, onChange } = this.props
if(dispatchInitialValue) {
onChange(value)
} else {
onChange("")
}
}

Expand Down

0 comments on commit 7640625

Please sign in to comment.