Author Topic: How to Change the selectallText in Dropdown  (Read 1683 times)

cui

  • Newbie
  • *
  • Posts: 11
    • View Profile
How to Change the selectallText in Dropdown
« on: December 25, 2024, 01:48:09 pm »
Hi everyone,

I would like to know how to change the ?selectallText? in the dropdown. I want to customize this text to show a specific message (e.g., "All Items Selected").
Could anyone provide guidance on how to achieve this? Any code examples or documentation links would be greatly appreciated!

Thank you in advance for your help.
Best regards

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6344
    • View Profile
Re: How to Change the selectallText in Dropdown
« Reply #1 on: December 31, 2024, 06:57:25 am »
That's column.title of the filter grid, so use the column.filter.selectGridObj property to update it.

Code: [Select]
selectGridObj: function (ui) {
ui.obj.colModel[0].title = "Hello World";
},

More about use of selectGridObj is documented here:

https://paramquery.com/pro/demos/filter_custom

cui

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: How to Change the selectallText in Dropdown
« Reply #2 on: December 31, 2024, 11:27:52 am »
Code: [Select]
    filterFn(ui) {
      if (ui.condition == 'range') {
        ui.column.pq_title = '全部'
        return {
          attr: "placeholder='请选择' readonly",
        }
      }
    },
I have already completed it using this method, but I didn't lock in the topic in time. Thank you for your response!