Skip to content

Commit

Permalink
Handle boolean checkbox states and deactivate 'Use Default' when manu…
Browse files Browse the repository at this point in the history
…al input detected on debugger. #7883
  • Loading branch information
Rohit Bhati committed Oct 25, 2024
1 parent 8b354ae commit e87df85
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ class ArgementsCollectionSchema extends BaseUISchema {
},
editable: true,
align_center: true,
disabled: (state) => {return state.use_default;}
},
{
id: 'use_default',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,11 @@ export default function DebuggerArgumentComponent({ debuggerInfo, restartDebug,
debuggerArgsSchema.current.sessData.aregsCollection.forEach((data) => {

if (skipStep) { return; }

// Ensure that unchecked boolean checkboxes are set to false.
if (data.type === 'boolean' && (data.value === undefined || data.value === '' || data.value === '0')) {
data.value = false;
}

if ((data.is_null || data.use_default || data?.value?.toString()?.length > 0) && isValid) {
isValid = true;
Expand Down

0 comments on commit e87df85

Please sign in to comment.