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

Selected data lost when adding new rows via ajax #145

Closed
jmfederico opened this issue Dec 7, 2015 · 0 comments
Closed

Selected data lost when adding new rows via ajax #145

jmfederico opened this issue Dec 7, 2015 · 0 comments
Labels

Comments

@jmfederico
Copy link
Contributor

Hello

In 1.4 series, data is lost from ajax enables fields which had no initial data on page load when re-triggering "init-autocomplete".

To reproduce:

  1. Load a page with ajax enabled fields.
  2. Select data on at least one field
  3. Trigger "init-autocomplete" (can be via console)
  4. Data will be lost

Symptoms:

  • If field had initial data on load, it will be re-set to what it had.
  • If field was empty, it will be set to empty.

This is a problem when using inline formsets with ajax enabled fields, when the user clicks the add-more rows link/button.

Seems that it is triggered because on the new reset function, it checks for initial data but not for current data.

crucialfelix added a commit that referenced this issue Jan 18, 2016
Only trigger reset() initially if data hasn't changed. Fixes #145 #94
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants