diff --git a/awx/ui_next/src/components/Search/Search.jsx b/awx/ui_next/src/components/Search/Search.jsx
index 25b450053c..d24bd1273c 100644
--- a/awx/ui_next/src/components/Search/Search.jsx
+++ b/awx/ui_next/src/components/Search/Search.jsx
@@ -187,13 +187,13 @@ class Search extends React.Component {
queryParams[key].forEach(val =>
queryParamsByKey[columnKey].chips.push({
key: `${key}:${val}`,
- node: {getLabelFromValue(val, columnKey)},
+ node: getLabelFromValue(val, columnKey),
})
);
} else {
queryParamsByKey[columnKey].chips.push({
key: `${key}:${queryParams[key]}`,
- node: {getLabelFromValue(queryParams[key], columnKey)},
+ node: getLabelFromValue(queryParams[key], columnKey),
});
}
});
diff --git a/awx/ui_next/src/util/qs.test.js b/awx/ui_next/src/util/qs.test.js
index 1f711e30f6..763b07434c 100644
--- a/awx/ui_next/src/util/qs.test.js
+++ b/awx/ui_next/src/util/qs.test.js
@@ -652,6 +652,28 @@ describe('qs (qs.js)', () => {
});
});
+ it('should not remove empty string values', () => {
+ const oldParams = {
+ foo: '',
+ };
+ const newParams = {
+ foo: 'two',
+ };
+ expect(mergeParams(oldParams, newParams)).toEqual({
+ foo: ['', 'two'],
+ });
+
+ const oldParams2 = {
+ foo: 'one',
+ };
+ const newParams2 = {
+ foo: '',
+ };
+ expect(mergeParams(oldParams2, newParams2)).toEqual({
+ foo: ['one', ''],
+ });
+ });
+
it('should retain unaltered params', () => {
const oldParams = {
foo: 'one',