GithubHelp home page GithubHelp logo

ashleygeorgeclarke / budibase-autocomplete Goto Github PK

View Code? Open in Web Editor NEW

This project forked from csltech/budibase-autocomplete

0.0 0.0 1.0 180 KB

Budibase Autocomplete Plugin

JavaScript 36.24% Svelte 63.76%

budibase-autocomplete's Introduction

Auto-Complete Plugin

Description

Budibase Auto-Complete plugin.

Find out more about Budibase.

This plugin is based on https://github.com/pstanoev/simple-svelte-autocomplete

This brings in a dynamic auto-complete field to complement the existing Budibase fields.

Instructions

Install the plugin and use is as you would any other string form field. The auto complete data source support 4 different modes:

  • Budibase Datasource (Supports the Asynchronous Flow)
  • Custom Query (Requires the Asynchronous Flow)
  • Direct API (To a public API directly from the client)
  • Static Values (Similar to Budibase's option picker)

In all cases, the plugin expects an array of objects. You can configure which field of the object is used as the label and which one is used for the value.

If using Custom Query, your query will need to support searching by the value field (probably selected item ID). Upon item select, an additional query is performed.

If you want to support arbitrary text in addition to selections, the plugin exposes a text binding.

Asynchronous Flow

Due to limitation on how events and data are processed in Budibase, an asynchronous flow using flags and state variables. To use the asynchronous flow, the following steps should be followed:

  • Bind a loading state variable to the Loading setting.
  • For the Custom Query mode, bind a results state variable to the Results setting.
  • Add the following actions to the Search Event:
    1. Set the loading state variable to "true"
    2. ...Some query actions (The current input text is exposed as a binding)
    3. For the Custom Query mode, set the results state variable to the query results
    4. Set the loading state variable to "false"

budibase-autocomplete's People

Contributors

ashleygeorgeclarke avatar csltech avatar

Forkers

branteagle

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.