8000 Feature: Add a dropdown options setter by RoboErikG · Pull Request #8833 · google/blockly · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Feature: Add a dropdown options setter #8833

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

Merged
merged 5 commits into from
Apr 17, 2025

Conversation

RoboErikG
Copy link
Contributor

The basics

The details

Resolves

Fixes #1288

Proposed Changes

Adds a setOptions function to field_dropdown to allow changing the set of options or the generator for options after creation.

Reason for Changes

This makes it easier to define blocks with dynamic dropdowns in JSON.

Test Coverage

Added a test to verify the selected option is updated after changing the set of options.

Documentation

We should consider updating the dropdown field docs to include this as a simpler option for the JSON definitions.

Additional Information

@RoboErikG RoboErikG added the PR: feature Adds a feature label Mar 31, 2025
@RoboErikG RoboErikG requested a review from a team as a code owner March 31, 2025 17:35
@RoboErikG RoboErikG requested a review from BenHenning March 31, 2025 17:35
Copy link
Contributor
@BenHenning BenHenning left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @RoboErikG! Had some thoughts and suggestions, PTAL.

@BenHenning BenHenning assigned RoboErikG and unassigned BenHenning Mar 31, 2025
@RoboErikG RoboErikG assigned BenHenning and unassigned RoboErikG Apr 1, 2025
Copy link
Contributor
@BenHenning BenHenning left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM @RoboErikG!

@BenHenning BenHenning assigned RoboErikG and unassigned BenHenning Apr 3, 2025
@RoboErikG RoboErikG merged commit a2d7621 into google:develop Apr 17, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: feature Adds a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create an API for setting menuGenerator_ on field_dropdown after creation
2 participants
0