How do I change color of an edited row?

How do I change color of an edited row?

sushmassushmas Posts: 22Questions: 5Answers: 2

I would like to change the color of rows as an indication to users that "this row has been recently changed". I am using select and buttons extensions with select-checkbox for single row edit.
Thanks

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    postEdit might be useful - you could add a class to the row to highlight it as you require.

    Allan

  • sushmassushmas Posts: 22Questions: 5Answers: 2

    Thanks Allan.

    I added this in my code:

    editor.on( 'postEdit', function ( e, json, data ) {
        $(this.modifier()).addClass('data-changed')
    } );
    
    

    I can the modified data in 'data' object. However I don't see any change in the look of the changed row. Once I move to the next row, the changed one has the same appearance as the rest of the rows.
    Is data-changed a builtin class? Or do I have to add it somewhere?
    Thanks

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    Is data-changed a builtin class?

    No. Is there a reference on this site that suggests it would be? If there is, could you let me know where so I can remove it please.

    Allan

This discussion has been closed.