Editable Tweet Data Grid
As a product manager at Twitter, you're building a new internal tool for content moderators to quickly review and make minor edits to tweet data. This problem focuses on creating a simplified, interactive data grid where specific tweet attributes can be edited directly within the table interface. This functionality is crucial for maintaining data quality and enabling swift content adjustments.
Your primary task is to build a React component that displays a list of tweets in a table format and allows users to edit certain fields directly within the grid.
id, text, author, and likes.text and likes columns should be editable.<input type="text"> for text, <input type="number"> for likes).id and author columns should remain non-editable.text and likes should be "persisted" (i.e., updated in the component's state and reflected in the display).text and likes values are immediately visible in the grid.<table> structure.text and likes cells are interactive and can be switched to input fields for editing.id and author cells are displayed as static text and cannot be edited.text input field.likes number input field.text and likes in the component's state.text and likes values are immediately displayed in the table, and the cells revert to a non-editing display mode.Constraints
Loading editor...