-
Notifications
You must be signed in to change notification settings - Fork 5
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
First "+" button doesn't go through for params that can have dims added #311
Comments
@MaxGhenis thanks for opening this issue. The behavior I had in mind was:
However, if the behavior needs an explanation, then there is probably something wrong with it. Do you think the first click on an empty array field should set two values for the array? |
In this case though, the first value is already set. What does clicking it the first time do? |
@MaxGhenis This is what I was thinking when I made the array fields. I think it helps to think about the adjustment JSON object that is being created behind the scenes as the array field is updated. Case 1: User clicks + without typing{
"Z": [
{
"value": []
}
]
}
{
"Z": [
{
"value": [1]
}
]
}
}
"Z": [
{
"value": [1, 1]
}
]
} If I changed the + behavior to automatically add 2 elements, then the data behind the scenes would skip to step 3. Case 2: User types a number and then clicks +
{
"Z": [
{
"value": [1]
}
]
} }
"Z": [
{
"value": [1, 1]
}
]
} |
^ I don't think this is necessarily the best way to do this. I think there is something missing from the UI that indicates that clicking the "+" button updates the parameter from an empty list to a list with one element. But, I do think that the behavior right now is at least consistent. |
Per our chat, this is because the reform parameterization starts off as |
For example, in https://github.com/PSLmodels/OG-USA/issues/611 I mentioned the TFP param, which looks like this by default:
After hitting the + once, it shows as if something's changed, but stays as one dim:
Hitting it again shows the additional dim:
The text was updated successfully, but these errors were encountered: