Azure / Azure/azure-iot-explorer
[BUG] Cant enable boolean option in Command Payload
- Dominant language
- TypeScript
- Stars
- 252
- Forks
- 85
- Avg merge
- 3h 32m
- Merged PRs (30d)
- 2
Description
**Describe the bug**
We have a DTMI model that defines a command with a object payload,
This object payload has 2 booleans. When i load them into the IoT Explorer, i can't enable any of the two booleans
DTMI:
```json
{
"@id": "dtmi:mycompany:components:upload;1",
"@type": "Interface",
"contents": [
{
"@id": "dtmi:mycompany:components:upload:format;1",
"@type": "Command",
"displayName": {
"en": "Format"
},
"name": "format",
"request": {
"@type": [
"CommandPayload",
"Initialized"
],
"displayName": {
"en": "Format"
},
"name": "format",
"initialValue": {
"fat": false,
"lfs": false
},
"schema": {
"@type": "Object",
"displayName": {
"en": "Object"
},
"fields": [
{
"displayName": {
"en": "FAT"
},
"name": "fat",
"schema": "boolean"
},
{
"displayName": {
"en": "LFS"
},
"name": "lfs",
"schema": "boolean"
}
]
}
}
}
],
"displayName": {
"en": "UploadComponent"
},
"@context": [
"dtmi:iotcentral:context;2",
"dtmi:dtdl:context;2"
]
}
```
How it looks in the IoT Explorer

When i click on the checkbox, they don't activate, making it impossible to use.
**To Reproduce**
Steps to reproduce the behavior:
1. Create a device that has this component
2. Load the DTMI model for this device
3. Go to the commands tab for this component
4. Click on the checkboxes.
**Expected behavior**
When i click the button, i expect a checkmark to appear
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- OS: Windows
- OS 10
- App version 0.15.8
**Additional context**
Setting the default value to true also doesn't work, they don't activate. It's not a pure visual glitch, becaus when i send the command to the device, the values are false.
Contributor guide
Research direction
Reproduce the issue with the provided DTMI model in the Commands tab and inspect the checkbox interaction and command-payload handling. Confirm that both boolean fields can be toggled, that true defaults are preserved, and that the sent command contains the selected values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100