Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sortable property on Column doesn't disable sorting options on UI #179

Open
luckyabhishek opened this issue Oct 30, 2023 · 2 comments
Open

Comments

@luckyabhishek
Copy link

Hi ,
I am using the datatable in the context of script report erpnext.
I return a couple of columns for my report and I set the "sortable" property on the second one as false.
But I still see that this column is sortable on the UI. is there something I am missing ?

This is what my config for column is

[
		{
			"fieldname": "lead_id",
			"fieldtype": "Link",
			"label": "Lead id",
			"options": "Lead",
			"width": 0
		},
		{
			"fieldname": "creation",
			"fieldtype": "Date",
			"label": "Lead Received Date",
			"sortable": "false"
		}]```
@d-miles
Copy link

d-miles commented Nov 20, 2023

You're using the string "false" rather than false. Try this instead:

	[
		{
			"fieldname": "lead_id",
			"fieldtype": "Link",
			"label": "Lead id",
			"options": "Lead",
			"width": 0
		},
		{
			"fieldname": "creation",
			"fieldtype": "Date",
			"label": "Lead Received Date",
			"sortable": false
		}
	]

@anker9
Copy link

anker9 commented Nov 29, 2023

You're using the string "false" rather than false. Try this instead:

	[
		{
			"fieldname": "lead_id",
			"fieldtype": "Link",
			"label": "Lead id",
			"options": "Lead",
			"width": 0
		},
		{
			"fieldname": "creation",
			"fieldtype": "Date",
			"label": "Lead Received Date",
			"sortable": false
		}
	]

Same issue((
sortable:false doesn't work, and Sort Ascending,Sort Descending,Reset sorting,Remove column ar' still aviable
Im using dat columns definition

 {name:'Status',
      id:'status',
      editable:false,
      sortable:false,
      width: 200, align: 'center', 
      
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants