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

Pressing enter after editing the field does not save the field #41

Open
jinjie opened this issue Sep 12, 2018 · 0 comments
Open

Pressing enter after editing the field does not save the field #41

jinjie opened this issue Sep 12, 2018 · 0 comments

Comments

@jinjie
Copy link

jinjie commented Sep 12, 2018

My Setup

Had AutoCompleteField created with

  • setRequiredSelection(false)
  • setStoredField('Title')

I didn't want to store an the ID of the look up table. My lookup table only consists of the history of the field. The user may enter any value in the field or search/select from the lookup table.

Problem

  1. Entering the field and hitting enter key does not save the field

Troubleshooting

After some troubleshooting, I found that there is 2 post data with the same name (Name of the field) sent to the server.

I believe that one is hidden and one is for the display/functionality of the lookup field.

In AutocompleteField.js, there is 2 events (change, select) set up to updateField(), which I think populates StoredField into the hidden field, so it will be used for saving.

However, when hitting on enter, I think either the form was submitted before updateField was invoked or updateField wasn't invoked at all.

Work around

I have to hit on Tab to move the nexts field to force the event change and select that invokes updateField() before hitting Enter to save the form.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant