Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvement to inline editing of long text #4648

Open
sniemetz opened this issue Dec 8, 2024 · 1 comment
Open

Improvement to inline editing of long text #4648

sniemetz opened this issue Dec 8, 2024 · 1 comment
Labels
Suggested Feature A suggested feature that is waiting review

Comments

@sniemetz
Copy link

sniemetz commented Dec 8, 2024

Hi Oli,

First off - many thanks for this library. Amazing attention to detail.

In my use case, I have rows with longText columns, some of which can contain 1MB or more of text.
To enable editing I used the textarea editor but the UX is poor with a lot of text.

I'd like, for the textarea editor to

  • pop out the textarea (I manually does this by hooking into the cellEditing event and modifying CSS)
  • don't close the text area on blur (eg if I use Ctrl-F to search in the textarea it closes)
  • cancel and save buttons (since we're not auto-saving on blur)

I've used the cellEditing event with a timeout of 100ms (because the textarea is not initialized right when the event fires).
Then I use the cellEdited and cellEditCancelled events to revert the CSS changes.
The CSS I use make the textarea position:fixed to pop it out of the table, with a fixed height/width

Arguably you could use a similar approach for "input" editor - showing a longer field for example. Maybe it makes sense to implement the input editor as actual input rather than making the div editable?

@sniemetz sniemetz added the Suggested Feature A suggested feature that is waiting review label Dec 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Suggested Feature A suggested feature that is waiting review
Projects
None yet
Development

No branches or pull requests

2 participants
@sniemetz and others