devtools icon indicating copy to clipboard operation
devtools copied to clipboard

Feat: Add multiline support for editing objects and arrays in `on.editInspectorState`

Open spaansba opened this issue 2 weeks ago • 0 comments

Problem

Currently, editInspectorState uses an <input/> element for editing values. This works fine for primitives, but becomes difficult when editing objects or arrays.

Proposed solution:

Switch to a <textarea> (or similar multiline input) when the value being edited is an object or array. This would allow:

  • Better visibility of the JSON structure
  • Easier editing with proper line breaks and indentation
  • Reduced chance of syntax errors

Example

Tanstack Devtools already does this:

https://github.com/user-attachments/assets/9f96c5d1-6b07-42bc-aa6b-25740b90bed8

I'll happily open a PR to add this feature

spaansba avatar Dec 14 '25 18:12 spaansba