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
{{ message }}
This repository was archived by the owner on Mar 4, 2025. It is now read-only.
Updated the autosave directive to use observables for timing instead of the timeout service
rxjs has a better way of handling cancellations, since we couldn't get an actual timer cancel to work in the timeout service. Also, this is probably a better way to go anyway since rxjs handles it. To handle this, we introduce two streams, one for autosave starts and one for autosave cancels. When the form becomes dirty (on a status change) we initiate a stream that debounces off the autosave start events, takes until an autosave cancel event, and then fires and autosave. The keyup events then just push autosave start events to the stream.
Also, added a final dirty and validation check before the actual save is fired. This addresses an issue where an autosaving card could save twice if the card close triggers a save, but the autosave never resets, and thus never checks to see that the form became pristine.
0 commit comments