How to provide as string supplied to absolute sort plugin?

How to provide as string supplied to absolute sort plugin?

sachinasachina Posts: 3Questions: 1Answers: 0

I am trying to use the following configuration for the absolute sort plugin.
var namesType = $.fn.dataTable.absoluteOrder({ value: "<no-value>", position: 'bottom' });
But it does not work.
I think the issue is with the <>.
Please advice.

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,237Questions: 1Answers: 2,598

    Hi @sachina ,

    We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

  • sachinasachina Posts: 3Questions: 1Answers: 0

    Sorry about that. And thanks Colin for guiding me.
    Please refer to the codepen:
    https://codepen.io/sachina/pen/ydELZR
    String #no-value# works while the string <no-value> does not.
    I guess, the question is how to escape the <> so that they will be treated as such.
    Cheers.
    Sachin.

  • colincolin Posts: 15,237Questions: 1Answers: 2,598
    Answer ✓

    Hi @sachina

    You need to use &lt; instead of \< and everything works fine, see here.

    Cheers,

    Colin

  • sachinasachina Posts: 3Questions: 1Answers: 0

    Hi Colin, that worked perfectly. Thanks much for the input. Cheers. Sachin.

This discussion has been closed.