* Refactor: initializeDashboardSort.js * change: onchange method to native js eventListener
11 lines
286 B
JavaScript
11 lines
286 B
JavaScript
'use strict';
|
|
|
|
function initializeDashboardSort() {
|
|
if (document.getElementById('dashhboard_sort')) {
|
|
document
|
|
.getElementById('dashhboard_sort')
|
|
.addEventListener('change', event => {
|
|
window.location = '/dashboard?sort=' + event.target.value;
|
|
});
|
|
}
|
|
}
|