vutoan266 / react-images-uploading

The simple images uploader applied Render Props pattern that allows you to fully control UI component and behaviors.
https://github.com/vutoan266/react-images-uploading
MIT License
320 stars 52 forks source link

Submit is triggered when clicking on buttom to upload image... drag and drop does not trigger the submission #155

Closed lucasmernin closed 1 year ago

lucasmernin commented 1 year ago

How can I ensure a submission is not trigged while uploading an image on click

lucasmernin commented 1 year ago

<button type="button" className="custom-file-upload" style={isDragging ? { color: 'red' } : undefined} onClick={onImageUpload} {...dragProps}

lucasmernin commented 1 year ago

add type="button" to not trigger submission