react-postprocessing icon indicating copy to clipboard operation
react-postprocessing copied to clipboard

perf(Select): fix update loop

Open donalffons opened this issue 10 months ago • 3 comments

See #236 for additional details

Would be great to hear your feedback on this. This code

const changed = (current.length !== api.selected.length) ? true : !current.every(o => api.selected.includes(o))

is only correct if there are no duplicates in any of the two arrays (otherwise, they would have to be de-duped first) - but I believe that is the case here.

donalffons avatar Aug 12 '23 11:08 donalffons