fix(ts_web): resolve TypeScript nullability and event typing issues across web components
This commit is contained in:
@@ -447,7 +447,7 @@ export class DeesWorkspaceFiletree extends DeesElement {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
const menuItems = [];
|
||||
const menuItems: Array<{ name?: string; iconName?: string; action?: () => Promise<void>; divider?: boolean }> = [];
|
||||
|
||||
if (node.type === 'directory') {
|
||||
// Directory-specific options
|
||||
@@ -503,7 +503,7 @@ export class DeesWorkspaceFiletree extends DeesElement {
|
||||
}
|
||||
);
|
||||
|
||||
await DeesContextmenu.openContextMenuWithOptions(e, menuItems);
|
||||
await DeesContextmenu.openContextMenuWithOptions(e, menuItems as any);
|
||||
}
|
||||
|
||||
private async handleEmptySpaceContextMenu(e: MouseEvent) {
|
||||
@@ -561,14 +561,14 @@ export class DeesWorkspaceFiletree extends DeesElement {
|
||||
menuOptions: [
|
||||
{
|
||||
name: 'Cancel',
|
||||
action: async (modalRef) => {
|
||||
action: async (modalRef: any) => {
|
||||
await modalRef.destroy();
|
||||
resolve(null);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: options.buttonName || 'Create',
|
||||
action: async (modalRef) => {
|
||||
action: async (modalRef: any) => {
|
||||
// Query the input element directly and read its value
|
||||
const contentEl = modalRef.shadowRoot?.querySelector('.modal .content');
|
||||
const inputElement = contentEl?.querySelector('dees-input-text') as DeesInputText | null;
|
||||
|
||||
Reference in New Issue
Block a user