Provide your users with dropdown options from your application.
paragon.connect
call to include the dropdowns
parameter, which has the key names that you set above. This key can be set to an array of options with two keys:
label
— The displayed text shown to the user for the dropdown option.value
— The value that will be saved (e.g. an option ID) when the user selects this dropdown option.
label
or value
are missing, the option will not be displayed, and a console warning will appear.value
property of the chosen option (or undefined if unselected).
loadOptions
function to paginate over a user’s Google Drive folders:
loadOptions
function instead of a static list, the dropdown will paginate through options as the user scrolls and allow for remote search across all available data.
loadOptions
will be called with 2 arguments:
cursor
: The last cursor to be called by the dropdown. If loading for the first time, this value will be undefined.search
: The search term that the user typed into the dropdown. If no search term was provided, this value will be undefined or the empty string (""
).