From 278b46667228d658be62dd96f9b7f39b4b256640 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tu=C4=9F=C3=A7e=20K=C3=BC=C3=A7=C3=BCko=C4=9Flu?= Date: Mon, 21 Aug 2023 10:16:10 +0300 Subject: [PATCH] Refactor #4285 --- components/lib/datatable/DataTable.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/lib/datatable/DataTable.vue b/components/lib/datatable/DataTable.vue index b02f9d4c5..96c47d196 100755 --- a/components/lib/datatable/DataTable.vue +++ b/components/lib/datatable/DataTable.vue @@ -522,8 +522,9 @@ export default { resolvedFieldDatas.set(item, ObjectUtils.resolveFieldData(item, this.d_sortField)); } + const comparer = new Intl.Collator(undefined, { numeric: true }).compare; + data.sort((data1, data2) => { - const comparer = new Intl.Collator(undefined, { numeric: true }).compare; let value1 = resolvedFieldDatas.get(data1); let value2 = resolvedFieldDatas.get(data2);