Author Topic: select dynamic options in toolbar  (Read 714 times)

edasilv

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 13
    • View Profile
select dynamic options in toolbar
« on: December 10, 2021, 01:05:11 am »
I have a select on a toolbar with different options of filename that need to be updated after creation, but How to update select text?

I found on documentation something like:  $('#import_file').pqSelect("refreshData");

but before refreshing data, I need to set new data to options. How can I do that?

BEFORE:                                                                                AFTER CREATION

var localFileNames = [{ 'original': 'Original'}]                           var localFileNames = [{ 'original': 'Original', 'custom': 'Custom'}]

{
     type: 'select',
     label: 'Choose file: ',
     attr: 'id="import_file"',
     options: localFileNames.  <-
},
« Last Edit: December 10, 2021, 10:08:01 am by paramvir »

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: select dynamic options in toolbar
« Reply #1 on: December 10, 2021, 10:07:27 am »
Please check the API documentation for toolbar to set new options after initialization: https://paramquery.com/pro/api#option-toolbar

Kindly let me know if you need further assistance.