fix: Populate possible_values and set data_type='Enum' for enum variables#91
Conversation
2338a5a to
0fe6cd9
Compare
|
Background: The Merge order:
|
|
@SakshiKekre Just merged #92. Could you rebase and merge? |
0fe6cd9 to
db3c6e9
Compare
|
@SakshiKekre please confirm that the |
|
@anth-volk Thanks for the merge.
|
526f17d to
b495485
Compare
|
@SakshiKekre Sorry, can you fully rebase all of this again? Made some changes to fix a couple bugs and improve code quality. |
…bles When a variable has possible_values (from policyengine), populate the possible_values field with JSON-encoded values and set data_type to "Enum". This allows the frontend to render dropdowns for enum variables like state_name. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
db3c6e9 to
4f29c96
Compare
|
@anth-volk Thanks for the heads up. Rebased, good to go now. |
Summary
possible_valuesfield with JSON-encoded values when a variable has enumerated optionsdata_typeto"Enum"for variables withpossible_values, enabling frontend dropdownsstate_nameand other enum variables rendered as text inputs instead of dropdownsContext
The frontend's
VariableInput.tsxonly renders a<Select>dropdown whendata_type === "Enum". Previously, enum variables had their Python type name (e.g.,"str") asdata_type, causing text inputs to render instead.Test plan
state_namevariable hasdata_type: "Enum"andpossible_values: ["AL", "AK", ...]🤖 Generated with Claude Code