fix
This commit is contained in:
parent
9df6372ea8
commit
1b7d94f7c9
|
|
@ -14,7 +14,7 @@ const editorFormWidth = {} as Record<string, { w: number; f: any }>;
|
|||
export { FMLocal } from "./typings";
|
||||
|
||||
export const Form: FC<FMProps> = (props) => {
|
||||
const { PassProp, body, feature, sfd_field } = props;
|
||||
const { PassProp, body, feature, sfd_field, style } = props;
|
||||
const fm = useLocal<FMInternal>({
|
||||
data: editorFormData[props.item.id]
|
||||
? editorFormData[props.item.id].data
|
||||
|
|
@ -167,7 +167,8 @@ export const Form: FC<FMProps> = (props) => {
|
|||
{toaster_el && createPortal(<Toaster cn={cx} />, toaster_el)}
|
||||
<div
|
||||
className={cx(
|
||||
"form-inner c-flex c-flex-1 c-flex-wrap c-items-start c-content-start c-absolute c-inset-0",
|
||||
"form-inner c-flex c-flex-1 c-flex-wrap c-items-start c-content-start",
|
||||
style === "flex" ? "" : "c-absolute c-inset-0" ,
|
||||
css`
|
||||
padding-right: 10px;
|
||||
`
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ export type FMProps = {
|
|||
on_load_deps?: any[];
|
||||
feature?: any[];
|
||||
sfd_field?: any;
|
||||
style: "default" | "flex"
|
||||
};
|
||||
|
||||
export type GenField =
|
||||
|
|
|
|||
|
|
@ -37,15 +37,11 @@ export const Popup: FC<PopupProp> = ({ on_close, open, child }) => {
|
|||
ref={(e) => (local.ref = e)}
|
||||
className="c-w-screen c-h-screen c-bg-transparent c-flex c-flex-row c-items-center c-justify-center"
|
||||
onClick={(e) => {
|
||||
console.log({ e });
|
||||
console.log(local.ref, e.target);
|
||||
if (local.ref) {
|
||||
if (e.target === local.ref) {
|
||||
on_close(false);
|
||||
local.open = false;
|
||||
local.render();
|
||||
} else {
|
||||
console.log("click inside popup");
|
||||
}
|
||||
}
|
||||
}}
|
||||
|
|
|
|||
Loading…
Reference in New Issue