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
Don't default an Item seletion in edit pulldowns if Item lookup fails #1088
Comments
I going to take a look at this |
I did some research about this issue, and I didn't find any solution to solve this using Rails' default form. An option to solve this would be using something like select2 |
@jeduardo824 Thanks for investigating! I think what @mdworken was suggesting was to have |
@armahillo Yeah! I thought that, but when I tested it, nothing fixed the behavior. Maybe I did something wrong... |
@jeduardo824 If you have opinions on how to implement this please push back, otherwise I think you can get by with:
|
I can make some tests this week! |
I've confirmed that @armahillo 's suggestion doesn't quite work, but found a work around. I'll push my code up once I'm in front of a computer again. |
Summary
Sometimes item lookup for these edit views can fail. When this happens, the app defaults to the first item in the pulldown (Adult Diaper XXL in the seed data).
This is a big problem because it can cause the item to be switched unintentionally.
Preferred behavior would be to display the field as blank and force the user to select a choice before hitting submit.
Steps to Reproduce
(I think this will work -- @armahillo )
Desired Behavior
As above, but either:
:name
field to end with "(deleted)" (in this case, if they save the record it should persist the change correctly, even though the item is deactivated. The item should not be re-activated in the process.)The text was updated successfully, but these errors were encountered: