[RELEASED] Selectize dropdown

Hi,
Great plugin - one thing I can’t figure out. How do get the “onchange” event and find the selected value? I tried “onfocus” - but then there is no “last id” value. I tried onblur - but then you have to click away - its not onchange of the value selected in the dropdwon.

What is the equivalent event of “onchange” - ie I am trying to make it to autobinding with an onchange event (like you would do with an input element and detecting the onchange event).

What am I missing?
Thank you
Lindsay

Hi @lindsay_knowcode
You need to use “Selectize item added” or “Item removed” Trigger.
In plugin, you always need to check related trigger and action that belong to this plugin. You cannot use the Bubble native Input value has changed for example

1 Like

Hi @Jici

I noticed something today. For single option dropdowns, clearing the value doesnt clear “SelectizeDropdownA’s All Values”

Ie, this screenshot shows the last selected item even though the current selection is empty.

image image

@LWeiLi Thanks to report! I will investigate on this issue. I plan to have a new release on wednesday that should contain a fix for that. :wink:

2 Likes

Hey there!

I’m excited to start using the plugin, but I’m having a few issues:

  1. Sometimes the dropdowns will get stuck in a perpetual loading state
  2. When I use the Item added, or Item created workflows it often adds multiple of the same items and/or blank items

How can I solve these issues?

Hi @austinjlturner
If this is stuck in loading state, normally there’s a wrong setting somewhere. Feel free to send me a PM with Screenshot and I can help you :wink:

I’m working on a fix for the created item loop. Actually, it’s may be possible to fix that with conditionnal to check if the created item already exist in your DB.

For added item, it should not be a problem anymore. However, I found that in some case it’s not triggered, Can you share a screenshot of your settings in PM and I can have a look? Thanks

@Jici - i have a use case for grouping that i cant seem to figure out. It appears grouping is only supported using a standard field, but in my case, i have a nested (recursive) field that i would like to group by. For instance parent/child. So i have a menu table, that has a parent_menu field that relates back to itself. How would i group items by parent_menu. I tried grouping within the OSWA Selectize as it allows for dynamic lookups, however the grouping does not seem to work there.

any help or guidance would be greatly appreciated

Hi @tgraham
This is an interesting case. I think it should work with the OSWA version. Can you share your setting?

sure:
I have tried many different things with the OSWA version, it just doesnt seem to actually group the items.

renders all the options, but with no grouping:
image

Possible for you to make app in public view mode and share editor url? (Can be in PM :wink: )

New version
Very important, this new version contain breaking change. You are concerned if you allow create item and create item in your DB and by loop issue when creating item. You are also concerned if you expect your field to refresh automically the options list (for example, if you have a first dropdown that is used to filter the second dropdown option list).

Initially, the dropdown was refreshing automatically to add or remove any new options created in DB or according to a field change. This part was creating issue because it also trigger New item created event. So basically, when user was creating a new item, this trigger the event, you create a new item in DB, this create the event again… and loop start. To avoid this issue, I needed to remove the automically refreshing options list for now. If you was using this, you can now use the new action “Refresh Option List”. So the WF could look like: Dropdown A item is added, Refresh Option List dropdown B. If you plan to use it with Create item, please consider adding a step before Refresh option and after to set and unset a state and filter Create item event using this state.

If you have issue with loop when you allow to create new item and you create a new item DB. Here’s the workflow process. Trigger on item Created. Create a new item in DB and use the new state “Last value created”. Consider add a small delay, just to be sure the first step is processed correctly (500-1000ms is enough from my testing) and use the new action “Update option” You need to provide the unique id (following the initial setting you have put on dropdown) of the Step 1 created item and current and new value. Current value need to be the same one use in Step 1 (or State Last value created) and new value can be the same. (but if you wan’t to format the value differently, you can do it now. Example: all lowercase.)
Exemple of create item process: https://sandboxjc.bubbleapps.io/selectize2
@sean13 @tomerlan5 @austinjlturner

Other new features:

  • Remove Item text shadow @sean13
  • Create filter. You can now use a function that will return true or false to filter user input text to create a new item. Example: return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(input) will only allow use to create item if a valid email address is entered. return /^.{2,10}$/.test(input) will only accept input text length between 2 and 10 characters. return input.length >= 3 will ask user to type 3 or more characters to be able to create new item. Example on demo page.
  • I have renamed Reset item to Set selected Items
  • Consider OSWA Deprecated. Bubble seem to have fixed issue with Option set attribute fields. All options set attributes seem now available in the Original Selectize dropdown. Thanks @Bubble . If you are using it, the issue with group should be fixed now @tgraham

Thanks a lot to help improving this plugin :wink:
If you have any issue, please send me a PM

3 Likes

Whooop! Great work @Jici !
Thank you for this update; appreciate all your hard work.

Going to try this out :grimacing:

1 Like

Very cool - is it possible to see a screenshot of the suggested workflow when you are adding new items? I’m having a hard time getting it to work.

@sean13
Sorry. I should have set the url for the editor in my previous post;)

Great - I assume “dataset” is just the Thing you’re creating?

(BTW The responsiveness is incredible man. Really impressed.)

1 Like

Sorry - one more question. How do you then iterate through the list of tags and associate each one with the artifact they’re related to? I.e. if I’m adding a new Post, and it has 3 Tags from the selectize plugin, how do I associate them with the Post?

Exactly. Dataset is one of my Database.
So you create a new thing and update the information for the option created by user using the unique_id (or any other value you have set as unique id).

The current and new value is the display setting. In most case I guess this will be the same, but I can see some case where it could be different. For example, you wan’t all the item created to be lowercase. You can use the bubble function to set it as lowercase when Create a new thing and update the new value with this new settiong

1 Like

Do you have some screenshot to help me to understand your case?
you can send me a PM if you need :wink:

Thanks @Jici - grouping now works like a charm.

1 Like