openrat-cms

OpenRat Content Management System
git clone http://git.code.weiherhei.de/openrat-cms.git
Log | Files | Refs | README

commit f0355bd31b3e8a361c5e71d5aa7af4ffcac59697
parent 76a862366546b0bef43ad4338c80792a2aa1a87c
Author: Jan Dankert <develop@jandankert.de>
Date:   Sun, 18 Apr 2021 01:22:09 +0200

Cleaner syntax for using a simple promise.

Diffstat:
Mmodules/template_engine/components/html/component_table/table.js | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/template_engine/components/html/component_table/table.js b/modules/template_engine/components/html/component_table/table.js @@ -70,7 +70,7 @@ export default function(element ) { table.find('tr.or-table-header > td, tr > th').removeClass('sort-asc').removeClass('sort-desc'); if ( isAscending ) column.addClass('sort-asc'); else column.addClass('sort-desc'); - new Promise( (resolve,reject) => { // Sorting should be asynchronous, because we do not want to block the UI. + Promise.resolve().then( () => { // Sorting should be asynchronous, because we do not want to block the UI. let rows = table.find('tr:not(.or-table-header)').toArray().sort(comparer(column.index())) if (!isAscending) {