Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow select2 without entity reference #4043

Closed
stefan-korn opened this issue Oct 26, 2023 · 0 comments · Fixed by #4044
Closed

Allow select2 without entity reference #4043

stefan-korn opened this issue Oct 26, 2023 · 0 comments · Fixed by #4044

Comments

@stefan-korn
Copy link
Contributor

User Story

At this moment you can use a select2 widget for a schema property if you specify "list" for the widget and "autocomplete" for the type in {schema}.ui.json. This way the select2 widget is always tied to a node entity reference (target_type = node). This means this is only working for properties that are stored as separate entities.

There maybe cases where you have a lot of options (enum) for a property, but do not want to store this property as a separate entity, but still use the select2 widget for better UX. This can be easily achieved if we do not set the target_type for every select2 widget.

My proposal would be to use "select2" for the type in {schema}.ui.json and do not set the target_type in that case. That way one can still use the "autocomplete" type to get a select2 widget with entity reference, but also get a select2 widget without entity reference if desired.

Acceptance Criteria

Allow a select2 widget for a property with enum values that is not stored as separate entity.

@github-actions github-actions bot added this to Incoming/Triage in DKAN 2 Issue Triage Oct 26, 2023
stefan-korn added a commit to stefan-korn/dkan that referenced this issue Oct 26, 2023
DKAN 2 Issue Triage automation moved this from Incoming/Triage to Closed Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

1 participant