mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-08 12:37:05 +03:00
Fixed editing non first index submissions.
The idSuffix was not being set properly and was set to undefined.
This commit is contained in:
@@ -34,7 +34,7 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
|
|||||||
|
|
||||||
this.categoryOptionRef = React.createRef();
|
this.categoryOptionRef = React.createRef();
|
||||||
|
|
||||||
this.idSuffix = this.idSuffix;
|
this.idSuffix = this.props.idSuffix;
|
||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
editing: false,
|
editing: false,
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ class SubmissionNoticeComponent extends React.Component<SubmissionNoticeProps, S
|
|||||||
|
|
||||||
elements.push(
|
elements.push(
|
||||||
<SponsorTimeEditComponent key={i}
|
<SponsorTimeEditComponent key={i}
|
||||||
idSuffix={this.state.idSuffix}
|
idSuffix={this.state.idSuffix + i}
|
||||||
index={i}
|
index={i}
|
||||||
contentContainer={this.props.contentContainer}
|
contentContainer={this.props.contentContainer}
|
||||||
submissionNotice={this}
|
submissionNotice={this}
|
||||||
@@ -119,7 +119,7 @@ class SubmissionNoticeComponent extends React.Component<SubmissionNoticeProps, S
|
|||||||
|
|
||||||
for (let i = 0; i < this.state.messages.length; i++) {
|
for (let i = 0; i < this.state.messages.length; i++) {
|
||||||
elements.push(
|
elements.push(
|
||||||
<NoticeTextSelectionComponent idSuffix={this.state.idSuffix}
|
<NoticeTextSelectionComponent idSuffix={this.state.idSuffix + i}
|
||||||
text={this.state.messages[i]}
|
text={this.state.messages[i]}
|
||||||
key={i}>
|
key={i}>
|
||||||
</NoticeTextSelectionComponent>
|
</NoticeTextSelectionComponent>
|
||||||
|
|||||||
Reference in New Issue
Block a user