Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion web/libs/editor/src/components/App/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ class App extends Component {

return (
<RelationsOverlay
key={guidGenerator()}
key="relations-overlay"
store={store}
ref={this.relationsRef}
tags={selectedStore.names}
Expand Down
2 changes: 1 addition & 1 deletion web/libs/editor/src/components/App/Grid.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ export default class Grid extends Component {
bordered={false}
style={{ height: 44 }}
/>
<Item root={this.props.root} onFinish={this.onFinish} key={i} annotation={selected} />
<Item root={this.props.root} onFinish={this.onFinish} key={selected.id} annotation={selected} />
</div>
)}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ const RegionItemDesc: FC<RegionItemOCSProps> = observer(({ item, collapsed, setC

return View ? (
<View
key={idx}
key={tag.name || `${tag.type}-${idx}`}
item={tag}
area={item}
collapsed={collapsed}
Expand Down
4 changes: 3 additions & 1 deletion web/libs/editor/src/components/SidePanels/SidePanels.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,9 @@ const SidePanelsComponent: FC<SidePanelsProps> = ({ currentEntity, panelsHidden,
{panelsHidden !== true && (
<>
{Object.entries(panels).map(([key, panel]) => {
const content = panel.map(({ props, Component }, i) => <Component key={i} {...props} />);
const content = panel.map(({ props, Component }) => (
<Component key={Component.displayName || Component.name || "panel"} {...props} />
));

if (key === "detached") {
return <Fragment key={key}>{content}</Fragment>;
Expand Down
2 changes: 1 addition & 1 deletion web/libs/editor/src/regions/PolygonRegion.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ const HtxPolygonView = ({ item, setShapeRef }) => {

return (
<Group
key={item.id ? item.id : guidGenerator(5)}
key={item.id}
name={item.id}
ref={(el) => setShapeRef(el)}
onMouseOver={() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ const HtxTextAreaResult = observer(({ item, control, firstResultInputRef, onFocu
return value.map((line, idx) => {
return (
<HtxTextAreaResultLine
key={idx}
key={`${item.id}-line-${idx}`}
idx={idx}
value={line}
readOnly={!editable}
Expand Down
Loading