Highlight row with unsaved changes

Does anybody have an example of how I could highlight/de-highlight rows in a skootable with unsaved changes?

A kind of conditional rendering on row has unsaved changes.

hmmm… I think you’d have to use the skuid editor. This would allow to use the events on the UI as they happen. The following is straight from the help.skuidify.com site with some minor changes.

  1. // Instantiate a new skuid.ui.Editor
  2. var myeditor = new skuid.ui.Editor(parentElement);

  3. function removeClass(){
  4.    // loop through all items in list to remove class
  5. }

  6. // Extend the default handle*****() functionalities

  7. myeditor.handleChange = function() {
  8.     skuid.ui.Editor.prototype.handleChange.call(myeditor);
  9.     // loop through the list to add/remove a class to each
  10.     // item called “unsaved_changes”

  11. }

  12. myeditor.handleSave= function() {
  13.     skuid.ui.Editor.prototype.handleSave.call(myeditor);
  14.     removeClass();
  15. }

  16. myeditor.handleCancel= function() {
  17.     skuid.ui.Editor.prototype.handleCancelhandleChange.call(myeditor);
  18.     removeClass();
  19. }
Then setup a class as per desired styling.

I think this will work. :wink:

Lemeno either way as I’d like to use the same code.