Log in / Sign up
Powered by Canny
Allow Array or multi-select field type
For more information see:
Created by Derrick Mehaffy
March 25, 2022
Thanks for flagging this. Right now the way I'm dealing with it is a boolean switch for each option, which as you can imagine is cumbersome when you're dealing with multiple categories, each with multiple options.
October 16, 2022
This is very funny, the component exist, but just for Strapi Backedn UI?
You can found this, in /admin/settings/users/<your-user-id>
July 20, 2022
to implement a multi select component in a sql database this must be a many-to-many relation.
| primary_id | name | ...
The foreign table could even have a unique constraint on the id and the enum to not allow duplicate selections.
| primary_id | enum_id |
UNIQUE together (primary_id, enum_id)
adding a label with internationalization would require an additional table
| enum_id | locale | value | label |
or even one table more to deduplicate the value field.
June 4, 2022
key value pairs in mysql:
May 11, 2022
Array of Key Value pairs on a collection is super useful and comes up often.
Say I want content managers to be able to add one or many "links" to the a collection:
Value: "some url"
Value: "Some url"
Both Postgres and Mongo support array type. So Array of key value pairs should be doable.
Right now it's very tacky to implement this. One could create a Links collection with "key" and "value" attribute fields. And then link it with Data, but this makes its tacky for content managers to manage a huge list of links , find them in the relationship and associate with the Data collection. Especially when most of them will have identical Keys in the Links collection.
I understand that we can provide a JSON column, but it's very tacky for non technical content managers to correctly form a JSON array for each Data item, and add the collection of links.
This Data and Links is just one example, but there are many many use cases where a free form collection of key value pairs will be required.
Am I missing something, or is there an better existing way of doing this?
May 6, 2022
Powered by Canny