Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author John Blackbourn

    (@johnbillion)

    WordPress Core Developer

    Thanks for the message. This is most likely due to the fact that your language uses a comma (instead of a period) for the decimal point symbol.

    I’ll look into why sorting doesn’t work in this situation.

    The script used to do the sorting uses the JS function parseFloat, which according to the article on W3 Schools:

    “This function determines if the first character in the specified string is a number. If it is, it parses the string until it reaches the end of the number, and returns the number as a number, not as a string.”

    JS does not consider “,” to be a valid part of a number, and so it stops as soon as it encounters that character, and returns the numbers up to that point.

    CodePen demonstration: https://codepen.io/crstauf/pen/xOJXAP/

    Plugin Author John Blackbourn

    (@johnbillion)

    WordPress Core Developer

    Thanks to @crstauf, this will be fixed in the next version of QM.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Does sort by Query time work?’ is closed to new replies.