From 2d93d6fa8935d4789e3743d27832004c97ac552f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Poul=20Kjeldager=20S=C3=B8rensen?= Date: Fri, 6 Sep 2024 14:50:52 +0200 Subject: [PATCH 1/5] fix: validation results should only be shown when not valid. --- packages/core/src/components/question/Question.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/components/question/Question.tsx b/packages/core/src/components/question/Question.tsx index 231c99a..e7f982f 100644 --- a/packages/core/src/components/question/Question.tsx +++ b/packages/core/src/components/question/Question.tsx @@ -66,7 +66,7 @@ export const Question: React.FC = ({ model, style }) => { questionModel={model} {...model.inputProperties ?? {}} /> - {typeof (model.validationResult?.message) !== "undefined" && model.validationResult?.message !== "" && } + {typeof (model.validationResult?.message) !== "undefined" && model.validationResult?.message !== "" && !model.validationResult.isValid && } ); } \ No newline at end of file From 8a0417cdfdafdb37c85677948b63343b88dd27b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Poul=20Kjeldager=20S=C3=B8rensen?= Date: Fri, 6 Sep 2024 15:12:14 +0200 Subject: [PATCH 2/5] fix: added option to override the slide button container --- packages/core/src/components/button/Button.tsx | 9 +++++---- .../renderers/slide-renderer/SlideRenderer.tsx | 9 +++++++-- packages/core/src/state/QuickformState.ts | 10 +++++++++- 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/packages/core/src/components/button/Button.tsx b/packages/core/src/components/button/Button.tsx index 7aa31cd..2ffe8fd 100644 --- a/packages/core/src/components/button/Button.tsx +++ b/packages/core/src/components/button/Button.tsx @@ -2,9 +2,10 @@ import React, { PropsWithChildren } from "react"; import { MouseEventHandler, useEffect, useState } from "react"; import { quickformtokens } from "../../style/quickFormTokensDefinition"; -import { makeStyles, shorthands } from "@griffel/react"; +import { makeStyles, mergeClasses, shorthands } from "@griffel/react"; type BtnContainerProps = { + readonly buttonClassName?: string; readonly className?: string; readonly style?: React.CSSProperties; readonly disabled?: boolean; @@ -37,7 +38,7 @@ const useButtonStyles = makeStyles({ } }) -export const Button: React.FC> = ({ children, showPressEnter, onClick, disabled, visible, style }) => { +export const Button: React.FC> = ({ children, showPressEnter, onClick, disabled, visible, style, className, buttonClassName }) => { if (typeof visible !== "undefined" && visible === false) { return (<>); @@ -60,9 +61,9 @@ export const Button: React.FC> = ({ childre }, []); return ( -
+