Highlight row with unsaved changes

  • 1
  • Question
  • Updated 3 years ago
Does anybody have an example of how I could highlight/de-highlight rows in a skootable with unsaved changes?
Photo of Jarrod Hinson

Jarrod Hinson

  • 2,310 Points 2k badge 2x thumb

Posted 3 years ago

  • 1
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
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. ;)

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