sam-upload-v2 component in ngOnChanges is recreating the entire table whenever there is any change to the uploadedFiles input (https://github.com/GSA/sam-ui-elements/blob/master/src/ui-kit/form-controls/upload-v2/upload-v2.component.ts#L253).
When this happens, it causes a very noticeable visual refresh of the toggle switches. If a toggle switch is on, after ngOnChanges it will be replaced with a new switch that defaults to off, which will then animate itself turning on again.
To prevent this, could we go one level more granular in ngOnChanges and test whether there were any changes to each file control in the table, and only remake those that changed or were added?
sam-upload-v2component inngOnChangesis recreating the entire table whenever there is any change to theuploadedFilesinput (https://github.com/GSA/sam-ui-elements/blob/master/src/ui-kit/form-controls/upload-v2/upload-v2.component.ts#L253).When this happens, it causes a very noticeable visual refresh of the toggle switches. If a toggle switch is on, after
ngOnChangesit will be replaced with a new switch that defaults to off, which will then animate itself turning on again.To prevent this, could we go one level more granular in
ngOnChangesand test whether there were any changes to each file control in the table, and only remake those that changed or were added?