Skip to content

Commit

Permalink
Fix user label warning
Browse files Browse the repository at this point in the history
  • Loading branch information
beque committed Nov 6, 2024
1 parent 057b260 commit 84018b4
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions app/packs/src/components/UserLabels.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,45 +233,45 @@ class UserLabelModal extends Component {
name="userLabel"
options={accessList}
onChange={this.handleAccessChange}
value={accessList.find(({value}) => value === label.access_level)}
value={accessList.find(({ value }) => value === label.access_level)}
/>
</Form.Group>
<Form.Group controlId="titleInput" className="mb-2">
<Form.Label>
Title
</Form.Label>
<Form.Control
type="text"
ref={(m) => { this.titleInput = m; }}
defaultValue={label.title || ''}
/>
<Form.Control
type="text"
ref={(m) => { this.titleInput = m; }}
defaultValue={label.title || ''}
/>
</Form.Group>
<Form.Group controlId="descInput" className="mb-2">
<Form.Label>
Description
</Form.Label>
<Form.Control
type="text"
ref={(m) => { this.descInput = m; }}
defaultValue={label.description || ''}
/>
<Form.Control
type="text"
ref={(m) => { this.descInput = m; }}
defaultValue={label.description || ''}
/>
</Form.Group>
<Form.Group controlId="colorInput" className="mb-2">
<Form.Label>
Background Color
</Form.Label>
<InputGroup className="mb-3">
<InputGroup.Text style={bcStyle} />
<Form.Control
type="text"
readOnly
ref={(m) => { this.colorInput = m; }}
value={label.color || this.state.defaultColor}
/>
</InputGroup>
<InputGroup.Text style={bcStyle} />
<Form.Control
type="text"
readOnly
ref={(m) => { this.colorInput = m; }}
value={label.color || this.state.defaultColor}
/>
</InputGroup>
</Form.Group>
<Form.Group controlId="formHorizontalPicker" className="m-2">
<CirclePicker width="90%" onChangeComplete={this.handleColorPicker} />
<CirclePicker width="90%" onChangeComplete={this.handleColorPicker} />
</Form.Group>
</Form>
);
Expand Down Expand Up @@ -422,7 +422,7 @@ class ShowUserLabels extends React.Component {
curLabelIds.includes(o.id) && (o.access_level > 0 || o.user_id === currentUser.id)
));

return labels.map((l) => <UserLabel {...l} />);
return labels.map((l) => <UserLabel {...l} key={`${element.id}_label`} />);
}
}

Expand Down

0 comments on commit 84018b4

Please sign in to comment.