processing / p5.js-web-editor

The p5.js Editor is a website for creating p5.js sketches, with a focus on making coding accessible and inclusive for artists, designers, educators, beginners, and anyone else! You can create, share, or remix p5.js sketches without needing to download or configure anything.
https://editor.p5js.org
GNU Lesser General Public License v2.1
1.3k stars 1.27k forks source link

Fix : [#2986] Add ref callback #2988

Open Ri-Sharma opened 5 months ago

Ri-Sharma commented 5 months ago

Fixes #2986

Changes:

  1. Added ref callback function to resolve the issue

I have verified that this pull request:

Ri-Sharma commented 5 months ago

If we have this problem in the CollectionListRow then odds are that we also have it in the SketchListRow. Those components are very similar and I don't like the current system where we have to make analogous changes in both places when we see an issue like this.

The SketchListRow is working fine and the problem only exists with the collections. I think this is because the SketchListRow uses class components where as the CollectionListRow uses funtional component and for some reason same logic is working for the classes but not for the functions.