MDL-68977 user: Normalise participant table filterdata
authorAndrew Nicols <andrew@nicols.co.uk>
Tue, 9 Jun 2020 03:01:11 +0000 (11:01 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Tue, 9 Jun 2020 06:35:21 +0000 (14:35 +0800)
user/amd/build/local/participantsfilter/filter.min.js
user/amd/build/local/participantsfilter/filter.min.js.map
user/amd/build/participantsfilter.min.js
user/amd/build/participantsfilter.min.js.map
user/amd/src/local/participantsfilter/filter.js
user/amd/src/participantsfilter.js

index 0f13ff2..5c2801e 100644 (file)
Binary files a/user/amd/build/local/participantsfilter/filter.min.js and b/user/amd/build/local/participantsfilter/filter.min.js differ
index 1cc0896..a778082 100644 (file)
Binary files a/user/amd/build/local/participantsfilter/filter.min.js.map and b/user/amd/build/local/participantsfilter/filter.min.js.map differ
index 60a726d..0e6d74a 100644 (file)
Binary files a/user/amd/build/participantsfilter.min.js and b/user/amd/build/participantsfilter.min.js differ
index 7965370..4f67ea5 100644 (file)
Binary files a/user/amd/build/participantsfilter.min.js.map and b/user/amd/build/participantsfilter.min.js.map differ
index 6670c2e..445dd3a 100644 (file)
@@ -184,7 +184,7 @@ export default class {
      * @returns {Number}
      */
     get jointype() {
-        return this.filterRoot.querySelector(Selectors.filter.fields.join).value;
+        return parseInt(this.filterRoot.querySelector(Selectors.filter.fields.join).value, 10);
     }
 
     /**
index 4e31a15..3808753 100644 (file)
@@ -365,11 +365,16 @@ export const init = participantsRegionId => {
      * @return {Promise}
      */
     const updateTableFromFilter = () => {
+        const filters = {};
+        Object.values(activeFilters).forEach(filter => {
+            filters[filter.filterValue.name] = filter.filterValue;
+        });
+
         return DynamicTable.setFilters(
             DynamicTable.getTableFromId(filterSet.dataset.tableRegion),
             {
-                filters: Object.values(activeFilters).map(filter => filter.filterValue),
-                jointype: filterSet.querySelector(Selectors.filterset.fields.join).value,
+                jointype: parseInt(filterSet.querySelector(Selectors.filterset.fields.join).value, 10),
+                filters,
             }
         )
         .catch(Notification.exception);