ແມ່ແບບ:Number table sorting/doc
ນີ້ຄືໜ້າຄູ່ມືການໃຊ້ງານຂອງ ແມ່ແບບ:Number table sorting ໃຊ້ໃນການຂຽນຄຳອະທິບາຍແມ່ແບບ ຫຼື ໂມດູລ ແລະ ໃສ່ໝວດ ສ່ວນລິ້ງຂ້າມພາສາກະລຸນາໃຊ້ວິກິດາຕ້າ |
Note. Adding data-sort-type="number" to the relevant column header solves many numerical sorting problems. See Help:Sorting. |
This template can be useful when building a sortable table in which a column contains both numbers and text. This template should be applied to every number in the column.
Currently, the template works for numbers between −10308 and 10308. Numbers outside this range will sort above or below other numbers depending on sign. See the Limitations section below.
By default the output is displayed using thousands separators. To display numbers as entered, use |format=no
.
The template generates a hidden "sort key" in the HTML markup which forces the JavaScript sorting algorithm to sort the column alphabetically.