simple fix for #467
This commit is contained in:
parent
2a09110d53
commit
42cc8fdb52
2 changed files with 7 additions and 4 deletions
|
@ -82,6 +82,7 @@ class FileActions extends React.PureComponent {
|
|||
} = this.props;
|
||||
|
||||
const name = fileInfo ? fileInfo.name : null;
|
||||
const path = fileInfo ? fileInfo.download_path : null;
|
||||
const channel = fileInfo ? fileInfo.channel_name : null;
|
||||
|
||||
const metadata = fileInfo ? fileInfo.metadata : null,
|
||||
|
@ -192,7 +193,7 @@ class FileActions extends React.PureComponent {
|
|||
{claimIsMine &&
|
||||
<DropDownMenuItem
|
||||
key={1}
|
||||
onClick={() => navigate("/publish", { name, channel })}
|
||||
onClick={() => navigate("/publish", { name, channel, path })}
|
||||
label={__("Edit claim")}
|
||||
/>}
|
||||
<DropDownMenuItem
|
||||
|
|
|
@ -48,6 +48,7 @@ class PublishForm extends React.PureComponent {
|
|||
isFee: false,
|
||||
customUrl: false,
|
||||
source: null,
|
||||
path: "",
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -418,13 +419,13 @@ class PublishForm extends React.PureComponent {
|
|||
}
|
||||
|
||||
componentWillMount() {
|
||||
const { name, channel } = this.props.params;
|
||||
const { name, channel, path } = this.props.params;
|
||||
|
||||
this.props.fetchClaimListMine();
|
||||
this._updateChannelList();
|
||||
|
||||
if (name && channel) {
|
||||
this.setState({ name, rawName: name, channel });
|
||||
if (name && channel && path) {
|
||||
this.setState({ name, rawName: name, channel, path });
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -535,6 +536,7 @@ class PublishForm extends React.PureComponent {
|
|||
label="File"
|
||||
ref="file"
|
||||
type="file"
|
||||
defaultValue={this.state.path}
|
||||
onChange={event => {
|
||||
this.onFileChange(event);
|
||||
}}
|
||||
|
|
Loading…
Add table
Reference in a new issue