-
-
Notifications
You must be signed in to change notification settings - Fork 10
Closed
Labels
bugSomething isn't workingSomething isn't workingfrontendgoal: ReviewEntriesjavascriptPull requests that update Javascript codePull requests that update Javascript code
Description
Describe the bug
The onChange method for GlossCell and DefinitionCell calls the onChange method of another component that is passed in as a prop.
To Reproduce
Steps to reproduce the behavior:
- Open a project
- Click on Review Entries
- Edit an entry
- Click the '+' to add a gloss
- Console displays the following warning:
Warning: Cannot update a component (`MTableEditRow`) while rendering a different component (`GlossList`). To locate the bad setState() call inside `GlossList`, follow the stack trace as described in https://reactjs.org/link/setstate-in-render
at GlossList (http://localhost:3000/static/js/src_components_Pronunciations_PronunciationsComponent_tsx-src_goals_ReviewEntries_ReviewEntri-d1c73d.chunk.js:2779:23)
at div
at http://localhost:3000/static/js/bundle.js:18405:66
at Grid (http://localhost:3000/static/js/bundle.js:27537:87)
at div
at http://localhost:3000/static/js/bundle.js:18405:66
at Grid (http://localhost:3000/static/js/bundle.js:27537:87)
at AlignedList (http://localhost:3000/static/js/src_components_Pronunciations_PronunciationsComponent_tsx-src_goals_ReviewEntries_ReviewEntri-d1c73d.chunk.js:2411:22)
at GlossCell (http://localhost:3000/static/js/src_components_Pronunciations_PronunciationsComponent_tsx-src_goals_ReviewEntries_ReviewEntri-d1c73d.chunk.js:2730:80)
at editComponent
at td
at http://localhost:3000/static/js/bundle.js:18405:66
at TableCell (http://localhost:3000/static/js/vendors-node_modules_microsoft_signalr_dist_esm_HubConnectionBuilder_js-node_modules_mui_icon-cadf9b.chunk.js:30502:83)
at tr
at http://localhost:3000/static/js/bundle.js:18405:66
at TableRow (http://localhost:3000/static/js/vendors-node_modules_microsoft_signalr_dist_esm_HubConnectionBuilder_js-node_modules_mui_icon-cadf9b.chunk.js:31841:82)
at MTableEditRow (http://localhost:3000/static/js/vendors-node_modules_material-table_core_dist_index_js-node_modules_mui_icons-material_ArrowU-801ebe.chunk.js:10774:39)
at MTableWithRefEditRow
...
Expected behavior
No warning in the console.
Environment:
- OS: Ubuntu 22.04
- Browser Version: Brave Version 1.48.171 Chromium: 110.0.5481.177 (Official Build) (64-bit)](https://brave.com/latest/)
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingfrontendgoal: ReviewEntriesjavascriptPull requests that update Javascript codePull requests that update Javascript code