mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-17 07:41:26 +00:00
remove react old defaultProps (#7576)
This commit is contained in:
@@ -19,16 +19,12 @@ const propTypes = {
|
||||
|
||||
class SeafileCodeMirror extends React.Component {
|
||||
|
||||
static defaultProps = {
|
||||
readOnly: true,
|
||||
};
|
||||
|
||||
onChange = (value) => {
|
||||
this.props.onChange && this.props.onChange(value);
|
||||
};
|
||||
|
||||
render() {
|
||||
const { value, readOnly, fileExt } = this.props;
|
||||
const { value, readOnly = true, fileExt } = this.props;
|
||||
const extensions = [...getLanguageExtensions(fileExt).filter(item => item !== null)];
|
||||
return (
|
||||
<div className='seafile-code-mirror-container'>
|
||||
|
Reference in New Issue
Block a user