Should exit sketchMode when creating new file in the file tree pane (#3993)
* fix new file sketch mode issue * initial extron app fixture * Add tests for exiting sketch mode on file tree actions * organise files * before all after all clean up * tweak after each * makes typedKeys as unsafe * update mask for draft line snapshots * fix mask * add fix again
This commit is contained in:
@ -194,7 +194,7 @@ const FileTreeItem = ({
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="contents" ref={itemRef}>
|
||||
<div className="contents" data-testid="file-tree-item" ref={itemRef}>
|
||||
{fileOrDir.children === null ? (
|
||||
<li
|
||||
className={
|
||||
@ -389,12 +389,14 @@ interface FileTreeProps {
|
||||
|
||||
export const FileTreeMenu = () => {
|
||||
const { send } = useFileContext()
|
||||
const { send: modelingSend } = useModelingContext()
|
||||
|
||||
function createFile() {
|
||||
send({
|
||||
type: 'Create file',
|
||||
data: { name: '', makeDir: false, shouldSetToRename: true },
|
||||
})
|
||||
modelingSend({ type: 'Cancel' })
|
||||
}
|
||||
|
||||
function createFolder() {
|
||||
|
Reference in New Issue
Block a user