Ver Fonte

#205 pipeline submit no edit (#206)

- dag width default to 100%

Co-authored-by: Fred Lefévère-Laoide <Fred.Lefevere-Laoide@Taipy.io>
Fred Lefévère-Laoide há 1 ano atrás
pai
commit
8faf6131b8

+ 1 - 1
gui/src/ScenarioDag.tsx

@@ -69,7 +69,7 @@ const ScenarioDag = (props: ScenarioDagProps) => {
     const className = useClassNames(props.libClassName, props.dynamicClassName, props.className);
 
     const sizeSx = useMemo(
-        () => ({ width: props.width || "50vw", height: props.height || "50vh" }),
+        () => ({ width: props.width || "100%", height: props.height || "50vh" }),
         [props.width, props.height]
     );
 

+ 7 - 1
gui/src/ScenarioViewer.tsx

@@ -151,7 +151,13 @@ const PipelineRow = ({
         },
         [label, setFocusName]
     );
-    const onSubmitPipeline = useCallback(() => submitEntity(id), [submitEntity, id]);
+    const onSubmitPipeline = useCallback(
+        (e: MouseEvent<HTMLElement>) => {
+            e.stopPropagation();
+            submitEntity(id);
+        },
+        [submitEntity, id]
+    );
 
     useEffect(() => setPipeline(label), [label]);
 

+ 1 - 1
src/taipy/gui_core/viselements.json

@@ -174,7 +174,7 @@
           {
             "name": "width",
             "type": "str",
-            "default_value": "50vw",
+            "default_value": "100%",
             "doc": "The maximum width, in CSS units, of the DAG."
           }
         ]