diff --git a/fragments/datalist/hatch.js b/fragments/datalist/hatch.js index 8728044b8..c586f083e 100644 --- a/fragments/datalist/hatch.js +++ b/fragments/datalist/hatch.js @@ -3,7 +3,17 @@ module.exports = { f.wrap($, 'themecleanflex-components-block') f.bindAttribute($.parent(),'model','model') - let heading = $.find('th').first() + let heading = $.find('th span').first() + + let dropdownArrow = $.find('svg').first() + let dropdownArrowClasses = `{ + 'rotate-0': active, + 'rotate-180': !active, + 'hidden': !model.sortable + }` + f.bindAttribute(dropdownArrow, 'class', dropdownArrowClasses, false) + f.bindEvent(dropdownArrow, 'click', "toggleSort(i)"); + f.mapField(heading, 'storageData') } } \ No newline at end of file diff --git a/fragments/datalist/template.html b/fragments/datalist/template.html index 8f7857fe4..116c9c5d5 100644 --- a/fragments/datalist/template.html +++ b/fragments/datalist/template.html @@ -1,9 +1,9 @@
- +
- - - + + + + + + + diff --git a/fragments/datalist/template.vue b/fragments/datalist/template.vue index 094d8015e..2d19adbb6 100644 --- a/fragments/datalist/template.vue +++ b/fragments/datalist/template.vue @@ -1,16 +1,32 @@
- Column Header + + Column1 Header @@ -12,8 +12,13 @@
Column itemColumn itemColumn1 item1Column2 item1
Column1 item2Column2 item2