ui only field change to not register as model changes

Pat VachonPat Vachon Member ✭✭
edited June 25 in Ideas
I've created a UI Only field called "Running Balance". Works great except that I have to save the model on page load as the custom field updates the rows in order to display the values.

I'd like the option to exclude the field from registering as a model change.

image
11
11 votes

Under Consideration · Last Updated

Comments

  • Matt SonesMatt Sones Member ✭✭
    edited February 2017
    YES!
  • Rob HatchRob Hatch Skuad ✭✭
    edited October 2016
    Sounds reasonable. 
  • Pat VachonPat Vachon Member ✭✭
    edited June 25
    ^^^ experiencing this as an issue once again. bump for votes. ^^^
  • Pat VachonPat Vachon Member ✭✭
    edited June 25
    ^^^ and again ^^^
  • Matt SonesMatt Sones Member ✭✭
    edited February 2017
    Would that I had another 10 votes for this!
  • edited November 2017
    I shall vote with ye
  • Pat VachonPat Vachon Member ✭✭
    edited June 25
    Stumbled upon this work around. If possible, set the UI field to read only. ;) I'm using js to set a running balance ui only field.
  • Pat VachonPat Vachon Member ✭✭
    edited June 25
    Another situation where this is coming up. Working on another workaround using CSS.
  • Matt SonesMatt Sones Member ✭✭
    edited June 25
    I've started running this line of jQuery after pageload or the javascript that changes the fields:

    $('.nx-modified').removeClass('nx-modified');
  • Pat VachonPat Vachon Member ✭✭
    edited December 2016
    Well #$%. That's a very simple work around. Why didn't I think of that.
  • Craig RosenbaumCraig Rosenbaum Member ✭✭
    edited January 2017
    I'm running this jQuery along with rendering the table. This re-enables filters/search, but when they are used, I get the unsaved changes error:
    Uncaught Model 'Products' has unsaved changes. To update this model's data, you must first save or cancel the changes. 
    I'm only updating UI only fields. Have you been able to filter or search after modifying UI only fields without saving the model?
  • edited January 2017
    Thanks Matt, great idea!
  • AllisonAllison Member
    edited February 2019
    I'm having the same issues but not sure how to implement the solution above.  Can anyone explain for a non-coder?
Sign In or Register to comment.