Search Component Locked Up with Unsaved Model Changes

  • 1
  • Problem
  • Updated 2 years ago
  • (Edited)
We have built out a CPQ system using Skuid and are doing User testing this week.  I am now seeing an issue with the Search Component and I can't figure out how to get around it.

My search component is for users to select a product to configure from our products object.

The select action populates a model called 'selectedProduct' passing the ID of the selected product in the search component to the selectedProduct conditon and then quering that model to get the full product details of the selected product so the user can then start configuring it to add to their quote.

Part of the select action is to populate a couple UI fields on the selectedProduct model to capture some additional data from the user which will get passed to the quote when they are done.  (Unit of measure defaults and Minimum Quote Quantity.)

Once we do the add to the quote (using a snippet) the user then goes back and searches for another product and continues to build their quote.

Before Brooklyn, this worked just fine.  The user could type the 2nd part into the search componet and the Select actions would kick off again.

After upgrading to Brooklyn 9.3.0 (or maybe 1) clicking on the 2nd search wouldn't do anything.  Console said "uncaught exception: Model 'selectedProduct' has unsaved changes. To update this model's data, you must first save or cancel the changes." so I added to my search component a Select action to first Cancel model changes in selectedProduct.  Problem went away.

Now we are on 9.3.3 and the console error is back on the 2nd search.  I added a Cancel action into my "add to quote" snippet and it still doesn't work.  The issue seems to be: if I have unsaved changes on the model that is manipulated by the search component, the search component dies and will not process the select actions.  A Cancel action before re-searching doesn't seem to be fixing it.
Photo of Chandra V

Chandra V, Champion

  • 6,966 Points 5k badge 2x thumb

Posted 2 years ago

  • 1
Photo of Chandra V

Chandra V, Champion

  • 6,966 Points 5k badge 2x thumb