Fix for RenderInstance (#12058)

* Fix for RenderInstance

- Do not call useNavigate within RenderInstance
- This breaks any plugins which try to use RenderInstance
- Pass navigate func through to <RenderInstance />

* Add playwright test for hover in forms

* Add translated plugin test

* Improve playwright tests

* Further unit test fixes

* Update docstring
This commit is contained in:
Oliver
2026-06-01 21:44:02 +10:00
committed by GitHub
parent f912ba501d
commit 7f86384a03
11 changed files with 155 additions and 19 deletions
+3
View File
@@ -2,6 +2,7 @@ import type { DefaultMantineColor, MantineStyleProp } from '@mantine/core';
import type { UseFormReturnType } from '@mantine/form';
import type { JSX, ReactNode } from 'react';
import type { FieldValues, UseFormReturn } from 'react-hook-form';
import type { NavigateFunction } from 'react-router-dom';
import type { ApiEndpoints } from '../enums/ApiEndpoints';
import type { ModelType } from '../enums/ModelType';
import type { PathParams, UiSizeType } from './Core';
@@ -160,6 +161,7 @@ export type ApiFormFieldSet = Record<string, ApiFormFieldType>;
* @param modelType : Define a model type for this form
* @param follow : Boolean, follow the result of the form (if possible)
* @param table : Table to update on success (if provided)
* @param navigate : Optional navigate function to use for following results (if follow is true)
*/
export interface ApiFormProps {
url: ApiEndpoints | string;
@@ -189,6 +191,7 @@ export interface ApiFormProps {
follow?: boolean;
actions?: ApiFormAction[];
timeout?: number;
navigate?: NavigateFunction;
keepOpenOption?: boolean;
onKeepOpenChange?: (keepOpen: boolean) => void;
}