Skip to content

Commit

Permalink
FIO-9280 fixed value property validation (#5894)
Browse files Browse the repository at this point in the history
  • Loading branch information
HannaKurban authored Nov 4, 2024
1 parent 2079440 commit 179a278
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/components/selectboxes/SelectBoxes.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import _ from 'lodash';
import { componentValueTypes, getComponentSavedTypes, boolValue } from '../../utils/utils';
import { componentValueTypes, getComponentSavedTypes, boolValue, getComponent } from '../../utils/utils';
import RadioComponent from '../radio/Radio';

export default class SelectBoxesComponent extends RadioComponent {
Expand Down Expand Up @@ -299,6 +299,17 @@ export default class SelectBoxesComponent extends RadioComponent {
return super.checkComponentValidity(data, dirty, rowData, options, errors);
}

setCustomValidity(messages, dirty, external) {
if (this.options.building && _.find(messages, {ruleName: 'invalidValueProperty'})) {
setTimeout(() => {
this.root && getComponent(this.root.components, 'valueProperty').setCustomValidity(messages, dirty);
}, 0);
return super.setCustomValidity(_.filter(messages, (message) => message.ruleName !=='invalidValueProperty'), dirty, external);
} else {
return super.setCustomValidity(messages, dirty, external);
};
}

validateValueAvailability(setting, value) {
if (!boolValue(setting) || !value) {
return true;
Expand Down

0 comments on commit 179a278

Please sign in to comment.