}
onClick={(evt) => {
// We override the `onClick` functionality to prevent form submission.
// The value changing occurs in the `onChange` in the `SegmentedControl`.
evt.preventDefault();
}}
>
{
// We override the `onClick` functionality to prevent form submission.
// The value changing occurs in the `onChange` in the `SegmentedControl`.
evt.preventDefault();
}}
glyph={}
>
{this.renderDocumentOrJsonView()}
{message && (
{message}
)}
);
}
static displayName = 'InsertDocumentDialog';
static propTypes = {
closeInsertDocumentDialog: PropTypes.func.isRequired,
toggleInsertDocumentView: PropTypes.func.isRequired,
toggleInsertDocument: PropTypes.func.isRequired,
insertDocument: PropTypes.func.isRequired,
insertMany: PropTypes.func.isRequired,
isOpen: PropTypes.bool.isRequired,
message: PropTypes.string.isRequired,
csfleState: PropTypes.object.isRequired,
mode: PropTypes.string.isRequired,
version: PropTypes.string.isRequired,
updateJsonDoc: PropTypes.func.isRequired,
jsonDoc: PropTypes.string,
jsonView: PropTypes.bool,
doc: PropTypes.object,
ns: PropTypes.string,
tz: PropTypes.string,
isCommentNeeded: PropTypes.bool,
updateComment: PropTypes.func.isRequired,
};
}
export default InsertDocumentDialog;