I want to remove/hide sort for specific field Block__c

const Block = [    
        fieldName: 'parcelUrl',
        type: 'url',
        typeAttributes: {
            label: {
                fieldName: Block
            target: '_blank'
        sortColumn: Block
        fieldName: Block__c
        fieldName: Block__c,
        sortable: "false"


1 Answer 1


It's false, not "false". In JavaScript, there are falsy and truthy values. Falsy values evaluate to false when used as a condition, and they are:

Value Type Description
null Null The keyword null — the absence of any value.
undefined Undefined undefined — the primitive value.
false Boolean The keyword false.
NaN Number NaN — not a number.
0 Number The Number zero, also including 0.0, 0x0, etc.
-0 Number The Number negative zero, also including -0.0, -0x0, etc.
0n BigInt The BigInt zero, also including 0x0n, etc. Note that there is no BigInt negative zero — the negation of 0n is 0n.
"" String Empty string value, also including '' and ``.
document.all Object The only falsy object in JavaScript is the built-in document.all.

Notice how "false" is not on that list. The only falsy string is the empty string (available as '', "", and ``.

Make sure you pay attention to the data type you're using, because JavaScript, being a loosely typed language, will make a lot of assumptions for you.

  • With or without "", '' sorting is still visible for the column. Mar 16, 2023 at 9:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .