Inline editor not preserving new edits

Inline editor not preserving new edits

ThePFJThePFJ Posts: 2Questions: 1Answers: 0

Hi,
I'm using the example at https://editor.datatables.net/examples/inline-editing/simple to create a datatable with the inline editing feature.
However, when editing values, as soon as I click on another field and the current field loses focus, its value returns to its original value. Even the example above is doing this - inline edits are not preserved.
I'm not getting any error messages at all in the console.
Currently using Chrome v94.
Thanks

Answers

  • tangerinetangerine Posts: 3,342Questions: 35Answers: 394

    The example works if you follow the docs:

    The most common use case is to simply click on the cell you want to edit and then hit return once the edit is complete.

  • ThePFJThePFJ Posts: 2Questions: 1Answers: 0

    Oops, sorry about that - should've seen that. Thanks for the quick reply.

    However, inadvertently stumbled into what I'm sure many of our users will also try to do. Not sure how many will think of hitting enter.

    Is there a way to have the fields updated when an input loses focus, or on any other event for that matter?

  • colincolin Posts: 15,104Questions: 1Answers: 2,582

    Yep, you can submit when the field is blurred with onBlur: 'submit', see example here,

    Colin

Sign In or Register to comment.