Closed davidkjackson54 closed 7 months ago
I have tried the suggested method provided here https://github.com/microsoft/vscode-webview-ui-toolkit/tree/main/src/dropdown to create a basic dropdown in my VSCode extension but I am not getting the selected item displayed in the list - The display item remains blank when selected.
My code:
<div class="dropdown-container"> <label for="list">Choose an option:</label> <vscode-dropdown id="list"> <vscode-option>Option Label #1</vscode-option> <vscode-option>Option Label #2</vscode-option> <vscode-option>Option Label #3</vscode-option> </vscode-dropdown> </div>
However the display remains blank when an item is selected here is the dropdown.
I select option 2 and the dropdown list correctly disappears but the selected item is not presented in the box
ALso - as a second issue. I have tried this: <vscode-option selected>Option Label #2</vscode-option>
<vscode-option selected>Option Label #2</vscode-option>
but the item is not displayed as a default selection.
I have tried the suggested method provided here https://github.com/microsoft/vscode-webview-ui-toolkit/tree/main/src/dropdown to create a basic dropdown in my VSCode extension but I am not getting the selected item displayed in the list - The display item remains blank when selected.
My code:
However the display remains blank when an item is selected here is the dropdown.
I select option 2 and the dropdown list correctly disappears but the selected item is not presented in the box
ALso - as a second issue. I have tried this:
<vscode-option selected>Option Label #2</vscode-option>
but the item is not displayed as a default selection.