Skip to content

FileTree component props type error. #385

@BHznJNs

Description

@BHznJNs

Currently the props type of FileTree is:

export type FileTreeProps = HTMLAttributes<HTMLDivElement> & {
  expanded?: Set<string>;
  defaultExpanded?: Set<string>;
  selectedPath?: string;
  onSelect?: (path: string) => void;
  onExpandedChange?: (expanded: Set<string>) => void;
};

Which inherited the HTMLAttributes<HTMLDivElement> so that the actual onSelect callback type will be (ReactEventHandler<HTMLDivElement> & ((path: string) => void)) | undefined

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions