aboutsummaryrefslogtreecommitdiff
path: root/FrontEnd/src/views/common/input
diff options
context:
space:
mode:
Diffstat (limited to 'FrontEnd/src/views/common/input')
-rw-r--r--FrontEnd/src/views/common/input/InputPanel.tsx8
1 files changed, 8 insertions, 0 deletions
diff --git a/FrontEnd/src/views/common/input/InputPanel.tsx b/FrontEnd/src/views/common/input/InputPanel.tsx
index 704330eb..3ac0cb04 100644
--- a/FrontEnd/src/views/common/input/InputPanel.tsx
+++ b/FrontEnd/src/views/common/input/InputPanel.tsx
@@ -76,6 +76,14 @@ export type InputPanelError = {
[index: number]: I18nText | null | undefined;
};
+export function hasError(e: InputPanelError | null | undefined): boolean {
+ if (e == null) return false;
+ for (const key in e) {
+ if (e[key] != null) return true;
+ }
+ return false;
+}
+
export interface InputPanelProps<InputList extends readonly Input[]> {
scheme: InputList;
values: MapInputListToValueTypeList<InputList>;