Skip to content

Commit

Permalink
chore: Avoid plot event idx to be overriden when specified.
Browse files Browse the repository at this point in the history
  • Loading branch information
mturoci committed Oct 5, 2023
1 parent 0abaf8c commit a91f52c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ui/src/plot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1128,8 +1128,8 @@ export const
const e = ev.gEvent.originalEvent
if (e.stateStatus && e.state === 'selected' && model.name && e.element.geometry.customOption.interactive) {
const ret = Array.isArray(e.element?.data)
? e.element.data.map(({ idx }: any) => ({ ...originalDataRef.current[idx], idx }))
: [{ ...originalDataRef.current[e.element.data.idx], idx: e.element.data.idx }]
? e.element.data.map(({ idx }: any) => ({ idx, ...originalDataRef.current[idx] }))
: [{ idx: e.element.data.idx, ...originalDataRef.current[e.element.data.idx] }]
wave.emit(model.name, event, ret)
}
})
Expand Down

0 comments on commit a91f52c

Please sign in to comment.