Flower Docs
  • OpenFlower overview
    • The "Hello World" tutorial
  • Videos
    • OpenFlower in 100 seconds
  • 🆕Setup and run
    • Cloud & Private Cloud
    • Self-hosting
      • Access local database or API
      • Google Cloud Platform
      • Heroku
      • Migration from Openblocks
      • Update MongoDB Versions
      • OpenFlower Version Update
      • Traefik loadbalancer
      • SMTP Server
    • Security
  • 🏨Workspaces & Teamwork
    • Workspaces
    • Members and Groups
    • Permissions for Resources
    • OAuth
      • KeyCloak
      • Google
      • GitHub
      • Generic OAuth Provider
    • Query library
    • OpenFlower Marketplace
  • ✨Build Applications
    • Create a new App
      • Modules
      • Version and Release Management
    • App Editor
      • Visual Components
        • Common Component Settings
        • File upload
        • Charts and graphs
        • Image
        • Option lists
        • List View
        • Drawer
        • Google Maps
        • Table
        • Messages / Toast
        • Calendar
      • Date handling
      • Bulk Editing
      • Layers
      • Data selection & Javascript
      • Use Markdown
      • Keyboard shortcuts
    • App Navigation
    • App Interaction
      • Event handlers
    • Themes & Styling
      • Design an efficient and user-friendly form
      • Customize Styles
      • Component Styling Possibilities
  • 🚀Connect your Data
    • Data source basics
    • Data sources in OpenFlower
      • APIs as Datasource
        • REST API
        • GraphQL
        • Google Sheets
      • SQL Databases
        • MySQL
        • MariaDB
        • PostgreSQL
        • Microsoft SQL Server
        • Oracle
      • NoSQL Databases
        • MongoDB
        • CouchDB
        • DynamoDB
      • InMemory Databases
        • Redis
      • File Storages
        • S3 File Storage
      • BigData & OLAP
        • Big Query
        • Snowflake
        • ClickHouse
        • Elasticsearch
      • Websocket Datasource
    • Query basics
      • Bind Query Data to Components
      • Query library
  • 🪄Workflows
    • n8n Integration
  • 💫Business Logic in Apps
    • Write JavaScript
      • JavaScript query
      • Temporary state
      • Transformers
      • Data responder
      • Built-in JS functions
  • 🙌Publish Apps
    • Share an App
    • Publish an App
    • Embedd an App
      • Embed Apps in React
      • Native embed SDK
        • Build the SDK from Source
  • 🔥OpenFlower Extension
    • Opensource Contribution
      • Develop UI components for Apps
      • Develop Data Source Plugins
    • Use third-party libraries in Apps
      • Day.js Date handling
      • Import your own JavaScript Library
    • Custom component
    • OpenFlower Open REST API
Powered by GitBook
On this page
  • Properties
  • Manual mode
  • Mapped mode
  1. Build Applications
  2. App Editor
  3. Visual Components

Option lists

A drop menu ensures easy and error-free user input by offering a list of possible options. OpenFlower supports implementing option lists using components such as Select and Multiselect. You can configure an option list either manually or by mapping data from your data sources.

Properties

Each option list has four properties.

  • Label: the displayed text of the option to users

  • Value: the unique identifier of the option

  • Disabled: disable the option (the default value is false)

  • Hidden: hide the option (the default value is false)

When more than one option in one list uses the same value, only the first option is valid and thus displayed.

Manual mode

Under Basic > Manual, click + Add to create a new option. Select an option to manually configure it. You can click ··· to Duplicate or Delete an option and drag ⋮⋮ to arrange its position.

Check the value of the selected option under Components in the data browser. For example, when New York is selected, you can find the string value "1" for locationSelect.

Manual mode is recommended for these scenarios:

  • Manually manageable and enumerable.

  • Used by only one component.

  • Data doesn't come from data sources.

Mapped mode

When you have option list data that comes from data sources, transformers or temporary state, you can use Mapped Mode. Under Basic > Mapped, input your data source array in Data box using JavaScript (JS) code. A list of options will be automatically mapped from this array. For example, access university information via {{university.data}}. Each item in the result array contains country, web_pages, alpha_two_code, and name.

You can reference the value of any filed of an option through item and its index i, starting from 0. In the following example, the Label of each option is the name of the university, the Value is the web_page, and those containing an opening parenthesis ( in their names are disabled. The default value is set to the web_pages of the first item using {{university.data[0].web_pages}}. Note that the default value of an option list should be an element from the Value array but not the Label array.

Check the value of the selected option under Components in the data browser. For example, when "Ahi Evran University" is selected, its string value [\"http://www.ahievran.edu.tr/\"] is displayed.

PreviousImageNextList View

Last updated 7 months ago

✨