mirror of
https://github.com/rowyio/rowy.git
synced 2025-12-29 00:16:39 +01:00
Merge branch 'develop' into rc
This commit is contained in:
@@ -153,7 +153,6 @@ export default function useMonacoCustomizations({
|
||||
return;
|
||||
} else {
|
||||
const jsonInput = jsonInputForTargetLanguage("typescript");
|
||||
console.log("jsonInput", jsonInput);
|
||||
await jsonInput.addSource({
|
||||
name: interfaceName,
|
||||
samples,
|
||||
@@ -196,7 +195,6 @@ export default function useMonacoCustomizations({
|
||||
const column = columns[columnKey];
|
||||
const type = getColumnType(column);
|
||||
if (type === "JSON") {
|
||||
console.log("adding json field definition");
|
||||
const interfaceName =
|
||||
columnKey[0].toUpperCase() + columnKey.slice(1);
|
||||
addJsonFieldDefinition(columnKey, interfaceName);
|
||||
|
||||
@@ -19,7 +19,7 @@ export default function ContextMenuActions(
|
||||
reset: () => void | Promise<void>
|
||||
): IContextMenuActions[] {
|
||||
const { tableState, rowyRun } = useProjectContext();
|
||||
const { enqueueSnackbar } = useSnackbar();
|
||||
const { enqueueSnackbar, closeSnackbar } = useSnackbar();
|
||||
const columns = tableState?.columns;
|
||||
const rows = tableState?.rows;
|
||||
const selectedRowIndex = selectedCell.rowIndex as number;
|
||||
@@ -37,6 +37,10 @@ export default function ContextMenuActions(
|
||||
const handleEvaluate = async () => {
|
||||
try {
|
||||
if (!selectedCol || !rowyRun || !selectedRow) return;
|
||||
handleClose();
|
||||
const evaluatingSnackKey = enqueueSnackbar("Evaluating...", {
|
||||
variant: "info",
|
||||
});
|
||||
const result = await rowyRun({
|
||||
route: runRoutes.evaluateDerivative,
|
||||
body: {
|
||||
@@ -47,13 +51,13 @@ export default function ContextMenuActions(
|
||||
columnKey: selectedCol.key,
|
||||
},
|
||||
});
|
||||
closeSnackbar(evaluatingSnackKey);
|
||||
if (result.success === false) {
|
||||
enqueueSnackbar(result.message, { variant: "error" });
|
||||
}
|
||||
} catch (error) {
|
||||
enqueueSnackbar(`Failed: ${error}`, { variant: "error" });
|
||||
}
|
||||
handleClose();
|
||||
};
|
||||
const isEmpty =
|
||||
cellValue === "" || cellValue === null || cellValue === undefined;
|
||||
|
||||
Reference in New Issue
Block a user