update rawName and channel on edit claim
This commit is contained in:
parent
c68b807638
commit
16f14fd382
2 changed files with 8 additions and 3 deletions
|
@ -76,6 +76,9 @@ class FileActions extends React.PureComponent {
|
|||
navigate,
|
||||
} = this.props;
|
||||
|
||||
const name = fileInfo ? fileInfo.name : null;
|
||||
const channel = fileInfo ? fileInfo.channel_name : null;
|
||||
|
||||
const metadata = fileInfo ? fileInfo.metadata : null,
|
||||
openInFolderMessage = platform.startsWith("Mac")
|
||||
? __("Open in Finder")
|
||||
|
@ -177,7 +180,7 @@ class FileActions extends React.PureComponent {
|
|||
{claimIsMine &&
|
||||
<DropDownMenuItem
|
||||
key={1}
|
||||
onClick={() => navigate("/publish", { name: fileInfo.name })}
|
||||
onClick={() => navigate("/publish", { name, channel })}
|
||||
label={__("Edit claim")}
|
||||
/>}
|
||||
<DropDownMenuItem
|
||||
|
|
|
@ -408,12 +408,14 @@ class PublishForm extends React.PureComponent {
|
|||
}
|
||||
|
||||
componentWillMount() {
|
||||
const { name } = this.props.params;
|
||||
const { name, channel } = this.props.params;
|
||||
|
||||
this.props.fetchClaimListMine();
|
||||
this._updateChannelList();
|
||||
|
||||
if (name) this.setState({ name });
|
||||
if (name && channel) {
|
||||
this.setState({ name, rawName: name, channel });
|
||||
}
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
|
|
Loading…
Add table
Reference in a new issue