File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
projects/saas-ui/src/app/main/components/add-plan Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -252,20 +252,21 @@ export class AddPlanComponent implements OnInit {
252252 const featuresGroup = this . addPlanForm . get ( 'features' ) as FormGroup ;
253253 const selectedFeatures = featuresGroup
254254 ? Object . keys ( featuresGroup . controls )
255- . filter (
256- key =>
257- featuresGroup . get ( key ) ?. value !== null &&
258- featuresGroup . get ( key ) ?. value !== '' ,
259- )
255+ // .filter(
256+ // key =>
257+ // featuresGroup.get(key)?.value !== null &&
258+ // featuresGroup.get(key)?.value !== '',
259+ // )
260260 . reduce (
261261 ( acc , key ) => {
262262 const feature = this . featureValue . features . find (
263263 f => ( f as any ) . key === key ,
264264 ) ;
265265 if ( feature ) {
266+ const featureVal = featuresGroup . get ( key ) ?. value ;
266267 acc [ feature . id ] = {
267268 id : ( feature . value as any ) ?. id ,
268- value : featuresGroup . get ( key ) ?. value ,
269+ value : featureVal || feature . defaultValue || '' ,
269270 } ;
270271 }
271272 return acc ;
You can’t perform that action at this time.
0 commit comments