Interactive Spreadsheet Cell Grid
Meesho sellers frequently manage extensive product catalogs, which involve editing various attributes for numerous products. A highly interactive and intuitive spreadsheet-like interface is crucial for efficient data entry and modification. This problem challenges you to build the core interaction for a grid of cells, mimicking a simplified spreadsheet, to significantly enhance the data entry experience for our sellers.
Your task is to implement an interactive grid of cells with selection, editing, and navigation capabilities.
Enter while in edit mode, or clicking outside the active input field (blur event), should save the new value to the cell and revert it to display mode.Escape while in edit mode should discard any changes made in the input field and revert the cell to display mode, retaining its original value.Up, Down, Left, Right) should allow moving the selection to adjacent cells. If an arrow key attempts to move the selection out of the grid boundaries, the selection should remain on the boundary cell.input element should replace the displayed text, allowing modification. This input should automatically focus when edit mode begins.Enter or blurring the input saves the new value and exits edit mode.Escape discards changes and exits edit mode.Up, Down, Left, Right) correctly navigate the selected cell within the grid boundaries.Constraints
A1+B1).Loading editor...