Prevent default values from updating when value changes

Issue:
I need help implementing a form field that:
Initializes with real-time data (unitPrice from Firebase)

doesn't update when the value is changed from firebase, but updates when other value only got changed (basicly user can choose between assets and choosing between asssets (that already have cached data from RQ) will not trigger loading so it will not reset)

Stops auto-updating after user modification

Resets to new defaults when parent context changes (assetId)

Current Behavior:

When switching assets (assetId changes), price input doesn't update immediately

Real-time price updates sometimes override user modifications

Form initialization race conditions when data loads after mount
Was this page helpful?