Skip to content

Commit

Permalink
add react keys in web/html/sec/manager/systems ssm/subscribe-channels…
Browse files Browse the repository at this point in the history
….tsx and subscribe-channels/subscribe-channels.tsx (#9386)
  • Loading branch information
jhonnyV-V authored Oct 23, 2024
1 parent b17b3b0 commit d7095c4
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
18 changes: 13 additions & 5 deletions web/html/src/manager/systems/ssm/ssm-subscribe-channels.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,19 @@ class BaseChannelPage extends React.Component<BaseChannelProps, BaseChannelState
const newBaseId = this.state.baseChanges.get(channel.base.id);
const baseOptions = channel.allowedBaseChannels
.filter((c) => !c.custom)
.map((c) => <option value={c.id}>{c.name}</option>)
.map((c) => (
<option key={c.id} value={c.id}>
{c.name}
</option>
))
.concat(defaultOption);
const customOptions = channel.allowedBaseChannels
.filter((c) => c.custom)
.map((c) => <option value={c.id}>{c.name}</option>);
.map((c) => (
<option key={c.id} value={c.id}>
{c.name}
</option>
));

return (
<select
Expand Down Expand Up @@ -468,7 +476,7 @@ class ChildChannelPage extends React.Component<ChildChannelProps, ChildChannelSt
<hr />
<dl className="col-lg-12">
{allowed.childChannels.map((child) => (
<dt className="row">
<dt className="row" key={child.id}>
<div className="col-md-6">
<ChannelLink id={child.id} newWindow={true}>
{child.name}
Expand Down Expand Up @@ -629,7 +637,7 @@ class SummaryPage extends React.Component<SummaryPageProps, SummaryPageState> {
};

render() {
const rows = this.props.allowedChanges.map((allowed) => {
const rows = this.props.allowedChanges.map((allowed: SsmAllowedChildChannelsDto) => {
const newBaseName = allowed.newBaseChannel
? allowed.newBaseChannel.name
: t("(Couldn't determine new base channel)");
Expand Down Expand Up @@ -688,7 +696,7 @@ class SummaryPage extends React.Component<SummaryPageProps, SummaryPageState> {
<hr />
<dl className="col-lg-12">
{allowed.childChannels.map((child) => (
<dt className="row">
<dt className="row" key={child.id}>
<div className="col-md-6">
<ChannelLink id={child.id} newWindow={true}>
{child.name + (child.recommended ? " (R)" : "")}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ class SystemChannels extends React.Component<SystemChannelsProps, SystemChannels
const isChecked = c.id === (this.state.selectedBase && this.state.selectedBase.id);

return (
<div className="radio">
<div className="radio" key={c.id}>
<input
type="radio"
value={c.id}
Expand All @@ -493,7 +493,7 @@ class SystemChannels extends React.Component<SystemChannelsProps, SystemChannels
const isChecked = c.id === (this.state.selectedBase && this.state.selectedBase.id);

return (
<div className="radio">
<div className="radio" key={c.id}>
<input
type="radio"
value={c.id}
Expand All @@ -519,7 +519,7 @@ class SystemChannels extends React.Component<SystemChannelsProps, SystemChannels
let mandatoryChannels = this.state.selectedBase && this.state.requiredChannels.get(this.state.selectedBase.id);

childChannels = Array.from(availableChildren.values()).map((c) => (
<div className="checkbox">
<div className="checkbox" key={c.id}>
<input
type="checkbox"
value={c.id}
Expand Down Expand Up @@ -692,7 +692,7 @@ class SystemChannels extends React.Component<SystemChannelsProps, SystemChannels
<div>
{availableChildren &&
Array.from(availableChildren.values()).map((c) => (
<div className="checkbox">
<div className="checkbox" key={c.id}>
<input
type="checkbox"
value={c.id}
Expand Down

0 comments on commit d7095c4

Please sign in to comment.