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

[Vue] Merge similar prop type into one entry to avoid confusion #626

Closed
skjnldsv opened this issue Sep 11, 2018 · 0 comments
Closed

[Vue] Merge similar prop type into one entry to avoid confusion #626

skjnldsv opened this issue Sep 11, 2018 · 0 comments
Assignees
Labels
1. to develop Accepted and waiting to be taken care of good first issue Good for newcomers
Milestone

Comments

@skjnldsv
Copy link
Member

skjnldsv commented Sep 11, 2018

capture d ecran_2018-09-11_21-04-19

ctrl.availableOptions = _.uniq(ctrl.availableOptions, function(option) { return option.name; });
if (ctrl.availableOptions.filter(function(option) { return option.id === ctrl.type; }).length === 0) {
// Our default value has been thrown out by the uniq function, let's find a replacement
var optionName = ctrl.meta.options.filter(function(option) { return option.id === ctrl.type; })[0].name;
ctrl.type = ctrl.availableOptions.filter(function(option) { return option.name === optionName; })[0].id;
// We don't want to override the default keys. Compatibility > standardization
// ctrl.data.meta.type[0] = ctrl.type;
// ctrl.model.updateContact();
}

@skjnldsv skjnldsv added 1. to develop Accepted and waiting to be taken care of vue labels Sep 11, 2018
@skjnldsv skjnldsv added this to the 3.0.0 milestone Sep 11, 2018
@nextcloud nextcloud deleted a comment from nextcloud-bot Sep 11, 2018
@skjnldsv skjnldsv added the good first issue Good for newcomers label Sep 11, 2018
@skjnldsv skjnldsv self-assigned this Sep 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant