Update selected gallery item when appending

This commit is contained in:
space-nuko
2023-05-22 14:19:16 -05:00
parent 40c7eaa7ce
commit db93cd8ed1

View File

@@ -96,6 +96,8 @@ export default class ComfyGalleryNode extends ComfyWidgetNode<ComfyBoxImageMetad
if (this.properties.updateMode === "append") { if (this.properties.updateMode === "append") {
const currentValue = get(this.value) const currentValue = get(this.value)
if (meta.length > 0)
this.selectedImage.set(currentValue.length);
return currentValue.concat(meta) return currentValue.concat(meta)
} }
else { else {