You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Relying on ember-buffered-proxy to detect model changes has the drawback that comparisons are strict, and therefore a simple type change is captured by the buffer.
When using an HTML input to edit the value of a model property that is defined as a number, the value is returned from the input as a string. This results in hasChanges being true, when in fact the value has not changed, only the type has changed.
Ember serializers will convert this value back to a number based on the model definition when posted to the server, but the buffer recognizing this as a change means it cannot be relied upon for something like enabling/disabling a Save button in a form.
I'm not sure whether the solution would be to do only value comparisons in ember-buffered-proxy or to support a flag that would allow value only comparisons.
The text was updated successfully, but these errors were encountered:
Relying on
ember-buffered-proxy
to detect model changes has the drawback that comparisons are strict, and therefore a simple type change is captured by the buffer.When using an HTML
input
to edit the value of a model property that is defined as a number, the value is returned from the input as a string. This results inhasChanges
being true, when in fact the value has not changed, only the type has changed.Ember serializers will convert this value back to a number based on the model definition when posted to the server, but the buffer recognizing this as a change means it cannot be relied upon for something like enabling/disabling a Save button in a form.
I'm not sure whether the solution would be to do only value comparisons in
ember-buffered-proxy
or to support a flag that would allow value only comparisons.The text was updated successfully, but these errors were encountered: