File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
flow_screen_components/datatable/force-app/main/default/lwc/datatable Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -650,7 +650,7 @@ export default class Datatable extends LightningElement {
650650 @api picklistReplaceValues = false ;
651651 @api
652652 get apex_picklistFieldMap ( ) {
653- return this . _apex_picklistFieldMap || [ ] ;
653+ return this . _apex_picklistFieldMap || { } ;
654654 }
655655 set apex_picklistFieldMap ( value ) {
656656 try {
@@ -661,7 +661,7 @@ export default class Datatable extends LightningElement {
661661 this . _apex_picklistFieldMap = [ ] ;
662662 }
663663 }
664- _apex_picklistFieldMap = [ ] ;
664+ _apex_picklistFieldMap = { } ;
665665
666666 convertPicklistFormat ( picklistMap ) {
667667 // Convert from user-friendly format: {"fieldName": [{"label":"...", "value":"..."}]}
@@ -672,9 +672,9 @@ export default class Datatable extends LightningElement {
672672 if ( Array . isArray ( fieldValues ) ) {
673673 // Convert array format to object format
674674 converted [ fieldName ] = { } ;
675- fieldValues ? .forEach ( item => {
676- if ( item ?. label && item ?. hasOwnProperty ( ' value' ) ) {
677- converted [ fieldName ] [ item ? .label ] = item ? .value ;
675+ fieldValues . forEach ( item => {
676+ if ( item ?. label != null && item ?. value != null ) {
677+ converted [ fieldName ] [ item . label ] = item . value ;
678678 }
679679 } ) ;
680680 } else {
You can’t perform that action at this time.
0 commit comments