muonw / muonw-powertable

▦ PowerTable is a Svelte component that turns JSON data into an interactive HTML table. Inspired by DataTables. Powered by Svelte.
https://muonw.github.io/muonw-powertable/
Other
218 stars 13 forks source link

Auto sizing of edit textarea #3

Closed muonw closed 2 years ago

muonw commented 2 years ago

Problem When editing a row, all tetxarea elements have the same height regardless of the height of the content. This makes the rows with multi-line content become shorter when switched to the edit mode and makes the editing less convenient in a small textarea.

Proposed solution Textarea elements can be sized dynamically to fit the content of each cell.

muonw commented 2 years ago

To avoid unnecessary computations, only in manual row selection (e.g. clicking on a checkbox, as opposed to using a batch selection tool), the height of the textarea elements will be increased to fit their content.