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

[RFR] Do not deduplicate single choice remote complete fields #566

Merged
merged 1 commit into from
Jul 23, 2015

Conversation

jpetitcolas
Copy link
Contributor

Fixing an issue found while debugging with @manuelnaranjo on [Gitter].

To prevent duplicates in multiple choices field, we remove already selected values from API responses. It works well for reference_many fields, but not for reference one. This PR disable deduplication for single choice fields.

.then(formattedResults => this._removeDuplicates(formattedResults, currentValue));
.then(results => this._transformRecords(field, results));

if (field.type() === 'reference_many') {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or choices

@jpetitcolas jpetitcolas force-pushed the remove_duplicate_multiple_only branch from 72d941d to af88689 Compare July 22, 2015 14:41
@jpetitcolas
Copy link
Contributor Author

Strange issue with tests:

'angular-bootstrap' is not in the npm registry.

Let's retry later.

@jpetitcolas jpetitcolas force-pushed the remove_duplicate_multiple_only branch from af88689 to cc7496d Compare July 23, 2015 12:52
fzaninotto added a commit that referenced this pull request Jul 23, 2015
[RFR] Do not deduplicate single choice remote complete fields
@fzaninotto fzaninotto merged commit de7ed47 into master Jul 23, 2015
@fzaninotto fzaninotto deleted the remove_duplicate_multiple_only branch July 23, 2015 16:33
@manuelnaranjo
Copy link

great! it worked well for me as well

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

Successfully merging this pull request may close these issues.

3 participants