Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/TYLERB/APPEALS-APPEALS-59606' in…
Browse files Browse the repository at this point in the history
…to feature/APPEALS-53424
  • Loading branch information
brandondorner committed Oct 24, 2024
2 parents 2fb9b65 + e6e830a commit 57f1156
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions client/app/queue/QueueTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -586,14 +586,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()}`;
Expand Down

0 comments on commit 57f1156

Please sign in to comment.