Git Product home page Git Product logo

bb-type-ahead's Introduction

bb-type-ahead

This is a readme for the Type ahead field custom plugin.

Description

A component used for querying tables, searching through results, selecting and then saving selected items back to the db.

Configuration

General Section

This has your main elements; your table select, types and fields.
General settings

  • The Table field is populates the selectable fields which can be binded to. REQUIRED
  • Type, there are 3 different types, these change which fields can be selected. REQUIRED
  • Field, this is used to select the field you wish to target/save back to the database after selecting. REQUIRED

Configuration Section

This section is all related to functionality within the component itself.
Screenshot 2023-06-02 at 12 05 06

  • Limit, this limits the number of results you can get back, the default being 25 and the max being 1000.
  • Type, works similarily to the one within general however theres only 2 instead of 3. REQUIRED
    • The standard field type search isn't case senative.
    • Array type only works for exact searches including case. (Currently you can't search for more than one option using this.)
  • Search Field, selectable which you wish to search against. REQUIRED
  • Label, field used to for visible select options in the frontend.
  • Value, field ussed for the hidden values for binding/saving back to the database.

##Demo

Fields - Single select

String Type ahead example

Arrays - Multi Select

Array demo for Type ahead

Relationship Multi-select

Relationship search and assign example

Disclaimer

You can search on arrays e.g. multi-select columns within Budibase. However you can only search one of the values within these. In the future I may expand this to search for multiple valeus within these field types.

bb-type-ahead's People

Contributors

conorwebb96 avatar

Stargazers

 avatar S avatar Noah Betzen avatar  avatar Michael Poirazi avatar  avatar Olivier@Diogenes avatar

Watchers

 avatar S avatar

bb-type-ahead's Issues

Using the selected value

Hey @ConorWebb96 ,

I'm having trouble getting the value selected by the field.
Here is my configuration:
image
image

In the component action, I want to change the value of another field to that of the selected element (the selected id into a number field).
I've tried the following:

{{ Field Value }}
{{ Field Value.value }}
{{ Field Value }}.value
return $("Field Value");
return $("Field Value").value;
return $("Field Value.value");

What am i missing? thank you!

Query a datasource instead of table

Hey @ConorWebb96

Thanks for the nice plugin, it was a project I was planning to look at to do something similar.
Do you think it's possible to use a datasource rather than a table for the data?
I'm using a query to obtain the data, which would allow me to do a more advanced text search in SQL, which isn't possible at the moment.

Thank you!

Search by substring within a name

Hey @ConorWebb96 ! This is a fantastic plugin and is very much needed in Budibase. It provides critical functionality, without it we would probably not use Budibase! Thanks!

With that said, and using it in production, we ran into an issue that's more of a feature request. I'll explain with an example.

We have a form, and a typeahead selector to choose a "Courthouse" from the table "Courthouses" (about 200 rows). Awesome.

Courthouses are named like this: "Courthouse of District A"; "Courthouse of the City of District B", etc.

So, for the user, remembering the exact name of a courthouse is not easy, they have all similar verbose names.

Therefore, when the user wants to search in the typeahead selector for a specific courthouse, the user just types "District A". This renders no results, as of now (this is the behavior I'm seeing), because typeahead does the search for text using the exact string from the beginning (like "Starts with" searches). Therefore, the user is forced to search "Courthouse of District A" to select the courthouse of his choice, but this is really hard as it's impossible to memorize the exact name of all courthouses.

Is there any way that I'm not aware of, for the search bar of the typeahead selector to search for any substring within a name, instead of just searching the substring in the beginning of the target string?

Hope I was clear enough!

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.