Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ra3orblade committed Nov 27, 2024
1 parent 587ff8c commit 0b26e1e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
13 changes: 6 additions & 7 deletions src/ts/component/menu/dataview/calendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,7 @@ const MenuCalendar = observer(class MenuCalendar extends React.Component<I.Menu>
e.stopPropagation();
this.setValue(U.Date.timestamp(item.y, item.m, item.d), true, true);
}}
onContextMenu={(e: any) => {

this.openContextMenu(e, item);
}}
onContextMenu={e => this.onContextMenu(e, item)}
>
{item.d}
</div>
Expand Down Expand Up @@ -151,7 +148,7 @@ const MenuCalendar = observer(class MenuCalendar extends React.Component<I.Menu>
this.props.position();
};

openContextMenu = (e: any, item: any) => {
onContextMenu (e: any, item: any) {
e.preventDefault();

const { getId, param } = this.props;
Expand All @@ -164,9 +161,11 @@ const MenuCalendar = observer(class MenuCalendar extends React.Component<I.Menu>
className,
classNameWrap,
data: {
options: [ { id: 'open', icon: 'expand', name: translate('commonOpenObject') } ],
options: [
{ id: 'open', icon: 'expand', name: translate('commonOpenObject') },
],
onSelect: () => {
U.Object.openDateByTimestamp(U.Date.timestamp(item.y, item.m, item.d), 'auto');
U.Object.openDateByTimestamp(U.Date.timestamp(item.y, item.m, item.d));
}
}
});
Expand Down
4 changes: 2 additions & 2 deletions src/ts/component/widget/view/calendar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const WidgetViewCalendar = observer(class WidgetViewCalendar extends React.Compo
key={i}
className={cn.join(' ')}
onClick={() => this.onClick(item.d, item.m, item.y)}
onContextMenu={(e: any) => this.openContextMenu(e, item)}
onContextMenu={(e: any) => this.onContextMenu(e, item)}
>
<div className="inner">
{item.d}
Expand All @@ -112,7 +112,7 @@ const WidgetViewCalendar = observer(class WidgetViewCalendar extends React.Compo
);
};

openContextMenu = (e: any, item: any) => {
onContextMenu = (e: any, item: any) => {
e.preventDefault();
e.stopPropagation();

Expand Down

0 comments on commit 0b26e1e

Please sign in to comment.