sf-crud 13.2.59 → 13.2.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/sf-crud.mjs +7 -1
- package/fesm2022/sf-crud.mjs.map +1 -1
- package/package.json +1 -1
package/fesm2022/sf-crud.mjs
CHANGED
|
@@ -2780,7 +2780,13 @@ class ControlComponent {
|
|
|
2780
2780
|
}
|
|
2781
2781
|
sendDependencyValue(data) {
|
|
2782
2782
|
if (this.control.dependency && this.setDependencyValue) {
|
|
2783
|
-
if (typeof (data) !== "object") {
|
|
2783
|
+
if (this.control.subtype === 'dropdown' && this.dataFromService.length > 0 && typeof (data) !== "object") {
|
|
2784
|
+
const selectedOption = this.dataFromService.find((item) => item[this.control.config?.optionValue] === data);
|
|
2785
|
+
if (selectedOption) {
|
|
2786
|
+
this.setDependencyValue.emit({ data: selectedOption[this.control.dependency.value], scope: this.control.dependency.scope });
|
|
2787
|
+
}
|
|
2788
|
+
}
|
|
2789
|
+
else if (typeof (data) !== "object") {
|
|
2784
2790
|
this.setDependencyValue.emit({ data: data, scope: this.control.dependency.scope });
|
|
2785
2791
|
}
|
|
2786
2792
|
else if (typeof (this.control.dependency) === "object") {
|