mirror of
https://github.com/strapi/strapi.git
synced 2025-09-25 08:19:07 +00:00
Fix upload plugin build
The issue was due to the ref I was using
This commit is contained in:
parent
dc55cfb879
commit
2f84afc0c7
@ -30,7 +30,8 @@ class Li extends React.Component {
|
||||
|
||||
handleClick = (e) => {
|
||||
e.preventDefault();
|
||||
this.refs.aTag.click();
|
||||
const aTag = document.getElementById('aTag');
|
||||
aTag.click();
|
||||
}
|
||||
|
||||
handleDelete = (e) => {
|
||||
@ -76,7 +77,7 @@ class Li extends React.Component {
|
||||
return (
|
||||
<CopyToClipboard text={item.url} onCopy={() => this.setState({copied: true})}>
|
||||
<li className={styles.liWrapper}>
|
||||
<a href={item.url} target="_blank" style={{ display: 'none' }} ref="aTag">nothing</a>
|
||||
<a href={item.url} target="_blank" style={{ display: 'none' }} id="aTag">nothing</a>
|
||||
<div className={styles.liContainer}>
|
||||
<div>
|
||||
<div />
|
||||
|
@ -16,12 +16,6 @@ import styles from './styles.scss';
|
||||
class PluginInputFile extends React.PureComponent {
|
||||
state = { isDraging: false };
|
||||
|
||||
handleClick = (e) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
this.refs.input.click();
|
||||
}
|
||||
|
||||
handleDragEnter = () => this.setState({ isDraging: true });
|
||||
|
||||
handleDragLeave = () => this.setState({ isDraging: false });
|
||||
@ -40,7 +34,7 @@ class PluginInputFile extends React.PureComponent {
|
||||
const { isDraging } = this.state;
|
||||
const link = (
|
||||
<FormattedMessage id="upload.PluginInputFile.link">
|
||||
{(message) => <span className={styles.underline} onClick={this.handleClick}>{message}</span>}
|
||||
{(message) => <span className={styles.underline}>{message}</span>}
|
||||
</FormattedMessage>
|
||||
);
|
||||
|
||||
@ -65,7 +59,6 @@ class PluginInputFile extends React.PureComponent {
|
||||
multiple
|
||||
name={name}
|
||||
onChange={onChange}
|
||||
ref="input"
|
||||
type="file"
|
||||
/>
|
||||
</label>
|
||||
|
Loading…
x
Reference in New Issue
Block a user