This commit is contained in:
Marta Kowalska
2025-12-22 20:22:30 +00:00
parent d4429300aa
commit bb81e7a336
90 changed files with 3676 additions and 1828 deletions
+2 -4
View File
@@ -1,6 +1,6 @@
import { useState, useContext, useMemo } from 'react';
import { getData } from '../data';
import { Gantt, ContextMenu, Editor, defaultMenuOptions } from '../../src/';
import { Gantt, ContextMenu, Editor, getMenuOptions } from '../../src/';
import { context } from '@svar-ui/react-core';
export default function ContextMenuOptions({ skinSettings }) {
@@ -17,9 +17,7 @@ export default function ContextMenuOptions({ skinSettings }) {
const [options] = useState(() => {
const ids = ['cut-task', 'copy-task', 'paste-task', 'delete-task'];
let arr = [{ id: 'add-task:after', text: ' Add below', icon: 'wxi-plus' }];
arr = arr.concat(
defaultMenuOptions.filter((op) => ids.indexOf(op.id) >= 0),
);
arr = arr.concat(getMenuOptions().filter((op) => ids.indexOf(op.id) >= 0));
arr.push({
id: 'my-action',
text: 'My action',