[COMPASS-4455] Adding a field on the table view shows a blank ui Created: 14/Oct/20  Updated: 29/Oct/23  Resolved: 20/Nov/20

Status: Closed
Project: Compass
Component/s: Table View
Affects Version/s: 1.22.1
Fix Version/s: 1.24.1

Type: Bug Priority: Major - P3
Reporter: Rhys Howell Assignee: Michael Rose (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: GIF File compass-4455-add-field.gif     GIF File new field in table docs view breaking.gif    
Story Points: 3
Documentation Changes: Not Needed
Sprint: Iteration Quince

 Description   

Currently when a user adds a field in the table view in compass-crud, we show a blank row. When the documents are then refreshed, the entire ui breaks. (Stack trace below)

Gif:

Stack trace:

/Applications/MongoDB Compass Beta.app/Contents/Resources/app.asar/node_modules/bugsnag-js/src/bugsnag.js:661 TypeError: Cannot read property 'classList' of null
    at Function.e.removeCssClass (/Applications/MongoDB Compass Beta.app/Contents/Resources/app.asar/node_modules/@mongodb-js/compass-crud/lib/index.js:13)
    at Function.e.addOrRemoveCssClass (/Applications/MongoDB Compass Beta.app/Contents/Resources/app.asar/node_modules/@mongodb-js/compass-crud/lib/index.js:13)
    at t.setInlineEditingClass (/Applications/MongoDB Compass Beta.app/Contents/Resources/app.asar/node_modules/@mongodb-js/compass-crud/lib/index.js:249)
    at t.stopEditing (/Applications/MongoDB Compass Beta.app/Contents/Resources/app.asar/node_modules/@mongodb-js/compass-crud/lib/index.js:249)
    at /Applications/MongoDB Compass Beta.app/Contents/Resources/app.asar/node_modules/@mongodb-js/compass-crud/lib/index.js:392
    at /Applications/MongoDB Compass Beta.app/Contents/Resources/app.asar/node_modules/@mongodb-js/compass-crud/lib/index.js:392
    at Function.e.iterateObject (/Applications/MongoDB Compass Beta.app/Contents/Resources/app.asar/node_modules/@mongodb-js/compass-crud/lib/index.js:13)
    at t.forEachCellComp (/Applications/MongoDB Compass Beta.app/Contents/Resources/app.asar/node_modules/@mongodb-js/compass-crud/lib/index.js:392)
    at t.stopEditing (/Applications/MongoDB Compass Beta.app/Contents/Resources/app.asar/node_modules/@mongodb-js/compass-crud/lib/index.js:392)
    at /Applications/MongoDB Compass Beta.app/Contents/Resources/app.asar/node_modules/@mongodb-js/compass-crud/lib/index.js:111
object.<computed> @ /Applications/MongoDB Compass Beta.app/Contents/Resources/app.asar/node_modules/bugsnag-js/src/bugsnag.js:661
/Applications/MongoDB Compass Beta.app/Contents/Resources/app.asar/node_modules/bugsnag-js/src/bugsnag.js:661 

DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
    at t.detach (/Applications/MongoDB Compass Beta.app/Contents/Resources/app.asar/node_modules/@mongodb-js/compass-crud/lib/index.js:249:27272)
    at /Applications/MongoDB Compass Beta.app/Contents/Resources/app.asar/node_modules/@mongodb-js/compass-crud/lib/index.js:392:12534
    at Array.forEach (<anonymous>)
    at t.removeRenderedCells (/Applications/MongoDB Compass Beta.app/Contents/Resources/app.asar/node_modules/@mongodb-js/compass-crud/lib/index.js:392:12473)
    at t.onGridColumnsChanged (/Applications/MongoDB Compass Beta.app/Contents/Resources/app.asar/node_modules/@mongodb-js/compass-crud/lib/index.js:392:9035)
    at /Applications/MongoDB Compass Beta.app/Contents/Resources/app.asar/node_modules/@mongodb-js/compass-crud/lib/index.js:25:2405
    at Array.forEach (<anonymous>)
    at Function.e.forEachSnapshotFirst (/Applications/MongoDB Compass Beta.app/Contents/Resources/app.asar/node_modules/@mongodb-js/compass-crud/lib/index.js:13:15589)
    at e.dispatchToListeners (/Applications/MongoDB Compass Beta.app/Contents/Resources/app.asar/node_modules/@mongodb-js/compass-crud/lib/index.js:25:2324)
    at e.dispatchEvent (/Applications/MongoDB Compass Beta.app/Contents/Resources/app.asar/node_modules/@mongodb-js/compass-crud/lib/index.js:25:1889)

 

 



 Comments   
Comment by Githook User [ 01/Dec/20 ]

Author:

{'name': 'Michael Rose', 'email': 'michael_rose@gmx.de', 'username': 'rose-m'}

Message: fix(compass-crud): ensure add field in table view works as expected COMPASS-4455, COMPASS-4340 (#2065)

Co-authored-by: Maurizio Casimirri <maurizio.cas@gmail.com>
Branch: 1.24-releases
https://github.com/mongodb-js/compass/commit/78a783b5badc4f1637d1bfae5d7dbaeeefdf0040

Comment by Githook User [ 20/Nov/20 ]

Author:

{'name': 'Michael Rose', 'email': 'michael_rose@gmx.de', 'username': 'rose-m'}

Message: fix(compass-crud): ensure add field in table view works as expected COMPASS-4455, COMPASS-4340 (#2065)

Co-authored-by: Maurizio Casimirri <maurizio.cas@gmail.com>
Branch: COMPASS-4449
https://github.com/mongodb-js/compass/commit/78a783b5badc4f1637d1bfae5d7dbaeeefdf0040

Comment by Githook User [ 20/Nov/20 ]

Author:

{'name': 'Michael Rose', 'email': 'michael_rose@gmx.de', 'username': 'rose-m'}

Message: fix(compass-crud): ensure add field in table view works as expected COMPASS-4455, COMPASS-4340 (#2065)

Co-authored-by: Maurizio Casimirri <maurizio.cas@gmail.com>
Branch: master
https://github.com/mongodb-js/compass/commit/78a783b5badc4f1637d1bfae5d7dbaeeefdf0040

Comment by Githook User [ 19/Nov/20 ]

Author:

{'name': 'Maurizio Casimirri', 'email': 'maurizio.cas@gmail.com', 'username': 'mcasimir'}

Message: Merge branch 'master' into COMPASS-4455-bump-to-10.1.3
Branch: COMPASS-4455-bump-to-10.1.3
https://github.com/mongodb-js/compass/commit/4dd2e2272f26776e665ce10c11533935af181326

Generated at Wed Feb 07 22:36:24 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.