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

FIO-9327 Fixed unintentional setting of defaultValue for Select Boxes #5925

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions src/components/selectboxes/SelectBoxes.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,7 @@ export default class SelectBoxesComponent extends RadioComponent {
}

get emptyValue() {
return this.component.values.reduce((prev, value) => {
if (value.value) {
prev[value.value] = false;
}
return prev;
}, {});
return {};
}

get defaultValue() {
Expand Down Expand Up @@ -307,7 +302,7 @@ export default class SelectBoxesComponent extends RadioComponent {
return super.setCustomValidity(_.filter(messages, (message) => message.ruleName !=='invalidValueProperty'), dirty, external);
} else {
return super.setCustomValidity(messages, dirty, external);
};
}
}

validateValueAvailability(setting, value) {
Expand Down
2 changes: 1 addition & 1 deletion test/forms/helpers/testBasicComponentSettings/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ export default {
},
modalEdit: {
'Should open and close modal window'(form, done) {
const componentsWithBug = ['columns', 'fieldset', 'panel', 'table', 'tabs', 'well']; //BUG: include them in test when it is fixed
const componentsWithBug = ['selectboxes', 'columns', 'fieldset', 'panel', 'table', 'tabs', 'well']; //BUG: include them in test when it is fixed
const testComponents = form.components.filter(comp => ![...componentsWithBug, 'button'].includes(comp.component.type));
testComponents.forEach((comp, index) => {
const isLastComp = index === (testComponents.length - 1);
Expand Down
Loading