Skip to content

Commit

Permalink
fix: fix folder renaming issue on safari
Browse files Browse the repository at this point in the history
  • Loading branch information
jbcl-io committed Apr 28, 2021
1 parent dc07890 commit e15ea3d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/containers/Sidebar/Folders/FolderItemEdit.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState } from 'react';
import { useState } from 'react';
import { FolderItem } from '@slater-notes/core';
import EditableTypography from '../../../components/EditableTypography';

Expand Down
11 changes: 4 additions & 7 deletions src/containers/Sidebar/Folders/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import Settings from '../../Dialogs/Settings';
import FolderItemEdit from './FolderItemEdit';
import ListGroup, { Props as ListGroupProps } from './ListGroup';
import CloudSync from '../../Dialogs/CloudSync';
import { throttle } from 'lodash';
import { defer, throttle } from 'lodash';
import FolderGroupTitle from '../../../components/SidebarComponents/FolderGroupTitle';

const Folders = () => {
Expand Down Expand Up @@ -164,12 +164,9 @@ const Folders = () => {
menuItems={[
{
label: 'Rename',
onClick: async () => {
if (activeFolderId !== folder.id) {
await setActiveFolderId(folder.id);
}

setEditingFolderId(folder.id);
onClick: () => {
if (activeFolderId !== folder.id) setActiveFolderId(folder.id);
defer(() => setEditingFolderId(folder.id));
},
},
{
Expand Down

0 comments on commit e15ea3d

Please sign in to comment.