Skip to content

Commit

Permalink
Fix collectionPath being emptied
Browse files Browse the repository at this point in the history
  • Loading branch information
shatakshiiii committed Feb 4, 2025
1 parent f3a4a2a commit b665605
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/webview/apps/contentCreator/addPluginPageApp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ let pluginNameTextField: VscodeTextfield;
let pluginTypeDropdown: VscodeSingleSelect;

let pluginNameInputField: HTMLInputElement;
let collectionPathUrlInputField: HTMLInputElement;

let collectionPathUrlTextField: VscodeTextfield;
let folderExplorerIcon: VscodeIcon;
Expand Down Expand Up @@ -78,10 +77,6 @@ function main() {
pluginNameInputField = pluginNameTextField.shadowRoot?.querySelector(
"#input",
) as HTMLInputElement;
collectionPathUrlInputField =
collectionPathUrlTextField.shadowRoot?.querySelector(
"#input",
) as HTMLInputElement;

pluginNameTextField.addEventListener("input", toggleCreateButton);
collectionPathUrlTextField.addEventListener("input", toggleCreateButton);
Expand Down Expand Up @@ -135,7 +130,7 @@ function openExplorer(event: any) {

if (selectedUri) {
if (source === "folder-explorer") {
collectionPathUrlInputField.value = selectedUri;
collectionPathUrlTextField.value = selectedUri;
initCollectionPathElement.innerHTML = selectedUri;
}
}
Expand All @@ -147,7 +142,7 @@ function openExplorer(event: any) {
function handleInitClearClick() {
pluginNameInputField.value = "";
pluginTypeDropdown.value = "filter";
collectionPathUrlInputField.value = "";
collectionPathUrlTextField.value = "";

initCollectionPathElement.innerHTML =
collectionPathUrlTextField.placeholder as string;
Expand Down

0 comments on commit b665605

Please sign in to comment.