@stemy/ngx-utils 19.2.2 → 19.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -5968,6 +5968,16 @@ class UploadComponent {
|
|
|
5968
5968
|
};
|
|
5969
5969
|
this.onTouched = () => {
|
|
5970
5970
|
};
|
|
5971
|
+
this.remove = index => {
|
|
5972
|
+
if (this.multiple) {
|
|
5973
|
+
const current = Array.from(this.value || []);
|
|
5974
|
+
current.splice(index, 1);
|
|
5975
|
+
this.writeValue(current);
|
|
5976
|
+
this.onRemove.emit(current);
|
|
5977
|
+
}
|
|
5978
|
+
this.writeValue(null);
|
|
5979
|
+
this.onRemove.emit([]);
|
|
5980
|
+
};
|
|
5971
5981
|
}
|
|
5972
5982
|
onDragEnter(ev) {
|
|
5973
5983
|
const types = Array.from(ev.dataTransfer.items || [])
|