From b40ed5ab3c9c291ea341ddef13608af387970e00 Mon Sep 17 00:00:00 2001 From: = Date: Fri, 20 Sep 2024 15:31:01 -0400 Subject: [PATCH] Fixed a bug where the filter params where not being properly updated in the get params if there was more than one filter present due to overwritten filter params during the QueueTable deep linking. --- client/app/queue/QueueTable.jsx | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/client/app/queue/QueueTable.jsx b/client/app/queue/QueueTable.jsx index 42d4098bf55..41edb0c0e89 100644 --- a/client/app/queue/QueueTable.jsx +++ b/client/app/queue/QueueTable.jsx @@ -579,14 +579,23 @@ export default class QueueTable extends React.PureComponent { // Remove paramsToClear from currentParams if they are not in tableParams paramsToClear.forEach((param) => { - if (!tableParams.has(param)) { - currentParams.delete(param); - } + currentParams.delete(param); }); // Merge tableParams and tabParams into currentParams, overwriting any duplicate keys for (const [key, value] of [...tabParams.entries(), ...tableParams.entries()]) { - currentParams.set(key, value); + if (key.includes('[]')) { + // Get all current values for the key + const existingValues = currentParams.getAll(key); + + // If the new value doesn't already exist, append it + if (!existingValues.includes(value)) { + currentParams.append(key, value); + } + } else { + // Set for all other keys (overrides existing values) + currentParams.set(key, value); + } } return `${base}?${currentParams.toString()}`;