Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions src/components/widgets/FileWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,6 @@ function extractFileInfo(dataURLs) {
}

class FileWidget extends Component {
defaultProps = {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the bottom it shows :


 FileWidget.defaultProps = {
   autofocus: false,
 };

so it seems the defaultprops are not the same, this is strange ...

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

multiple: false should be added there, since multiple is not a required property

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason I initially left it out was to do the simplest possible change. When defaultProps is set as an instance property, they are ignored, meaning that if we add multiple: false to the defaultProps, it is small change in the functionality. If the maintainers think we should fix both problems on a single PR, I'm happy to make the change 🙂

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I think we should rather fix the other problem later, to not break backwards-compatibility.

multiple: false,
};

constructor(props) {
super(props);
const { value } = props;
Expand Down