Add coexistence checks to all enqueue methods to prevent loading both React and Grid.js assets simultaneously. Changes: - ReactAdmin.php: Only enqueue React assets when ?react=1 - Init.php: Skip Grid.js when React active on admin pages - Form.php, Coupon.php, Access.php: Restore classic assets when ?react=0 - Customer.php, Product.php, License.php: Add coexistence checks Now the toggle between Classic and React versions works correctly. Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
20 lines
1.3 KiB
TypeScript
20 lines
1.3 KiB
TypeScript
import * as React from "react";
|
|
import { ArrayValue, PropsWithAs } from "reakit-utils/types";
|
|
import { ButtonOptions, ButtonHTMLProps } from "../Button/Button";
|
|
import { unstable_FormStateReturn } from "./FormState";
|
|
import { DeepPath, DeepPathValue } from "./__utils/types";
|
|
export declare type unstable_FormPushButtonOptions<V, P extends DeepPath<V, P>> = ButtonOptions & Pick<unstable_FormStateReturn<V>, "baseId" | "values" | "push"> & {
|
|
/**
|
|
* FormInput's name as in form values. This should point to array value.
|
|
*/
|
|
name: P;
|
|
/**
|
|
* The value that is going to be pushed to `form.values[name]`.
|
|
*/
|
|
value: ArrayValue<DeepPathValue<V, P>>;
|
|
};
|
|
export declare type unstable_FormPushButtonHTMLProps = ButtonHTMLProps;
|
|
export declare type unstable_FormPushButtonProps<V, P extends DeepPath<V, P>> = unstable_FormPushButtonOptions<V, P> & unstable_FormPushButtonHTMLProps;
|
|
export declare const unstable_useFormPushButton: <V, P extends DeepPath<V, P>>(options: unstable_FormPushButtonOptions<V, P>, htmlProps?: ButtonHTMLProps | undefined) => unstable_FormPushButtonHTMLProps;
|
|
export declare const unstable_FormPushButton: <V, P extends DeepPath<V, P>, T extends React.ElementType<any> = "button">(props: PropsWithAs<unstable_FormPushButtonOptions<V, P>, T>) => JSX.Element;
|