Author Topic: I need to disable some element from the list in the dropdown based on logic  (Read 400 times)

developer1

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 44
    • View Profile
Provide a demo where I can disable of selection of item from dropdown based on the logic

developer1

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 44
    • View Profile
For your reference screenshot attached,

We are facing the issue to setup the item in dropdown list.

We have two requirements,
1)   Need to disable some item for selection
2)   Need some extra space in the item hierarchy-wise

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
1. option can be disabled dynamically by adding pq_disabled: true property

Please check editor.options callback in this example https://paramquery.com/pro/demos/editors_conditional

2. leading space can be added by adding   in the option text.
e.g., { "value": "SE", "text": " Speedy Express" }