2

Good afternoon,

I'm a beginner in symfony so I started to learn about bundles. I installed and configured EasyAdminBundle and it works fine.

My question is how can I disable "sort" in one field? I mean when I click on the sort button nothing happens.

Thank you for your help.

Javier Eguiluz
  • 3,987
  • 2
  • 23
  • 44
Anis Abida
  • 33
  • 1
  • 4

1 Answers1

2

Internally EasyAdmin adds an option called sortable to each entity property. Since we don't restrict the options you can define for a property in the config.yml file, you can set this option explicitly for the fields you want to remove the sorting:

easy_admin:
    # ...
    User:
        class: ...
        list:
            fields:
                # ...
                - { property: '...', sortable: false }
Javier Eguiluz
  • 3,987
  • 2
  • 23
  • 44
  • Thank you for your response. I looked for this problem and I resolved my problem by adding "sortable: false" in the fields property of my config.yml. It works now, thank you again for your help. – Anis Abida May 03 '16 at 11:21
  • Well, this is a bit embarrassing for me because I didn't think about this option which obviously is the best one and should always work. I'm going to delete my previous answer and add your reply. Thanks! – Javier Eguiluz May 03 '16 at 14:03