mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
MDL-68167 user: filter elements should listen to accessibleChange event
This commit is contained in:
parent
15a349dd4f
commit
ceda24637d
2
user/amd/build/participantsfilter.min.js
vendored
2
user/amd/build/participantsfilter.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -30,6 +30,8 @@ import Notification from 'core/notification';
|
||||
import Pending from 'core/pending';
|
||||
import Selectors from './local/participantsfilter/selectors';
|
||||
import Templates from 'core/templates';
|
||||
import CustomEvents from 'core/custom_interaction_events';
|
||||
import jQuery from 'jquery';
|
||||
|
||||
/**
|
||||
* Initialise the participants filter on the element with the given id.
|
||||
@ -475,7 +477,9 @@ export const init = participantsRegionId => {
|
||||
});
|
||||
|
||||
// Add listeners for the filter type selection.
|
||||
filterSet.querySelector(Selectors.filterset.regions.filterlist).addEventListener('change', e => {
|
||||
let filterRegion = jQuery(getFilterRegion());
|
||||
CustomEvents.define(filterRegion, [CustomEvents.events.accessibleChange]);
|
||||
filterRegion.on(CustomEvents.events.accessibleChange, e => {
|
||||
const typeField = e.target.closest(Selectors.filter.fields.type);
|
||||
if (typeField && typeField.value) {
|
||||
const filter = e.target.closest(Selectors.filter.region);
|
||||
|
Loading…
x
Reference in New Issue
Block a user