From 6298df14e71628b8153f46d421ee1f9075a79f66 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Wed, 15 Mar 2023 21:20:56 +0530 Subject: [PATCH] Hide only the filtered-out button in a row, not the entire row --- ui/media/js/main.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/media/js/main.js b/ui/media/js/main.js index 8f1ecea3..63683b65 100644 --- a/ui/media/js/main.js +++ b/ui/media/js/main.js @@ -401,7 +401,8 @@ function showImages(reqBody, res, outputContainer, livePreview) { } buttons.forEach(btn => { if (Array.isArray(btn)) { - if (btn.find(btnInfo => btnInfo.filter && btnInfo.filter(req, img) === false)) { + btn = btn.filter(btnInfo => !btnInfo.filter || btnInfo.filter(req, img) === true) + if (btn.length === 0) { return } } else if (btn.filter && btn.filter(req, img) === false) {