This commit is contained in:
rizrmd 2024-02-15 10:09:11 -07:00
parent f58ee518c1
commit 4eebe5bb99
5 changed files with 13 additions and 4 deletions

View File

@ -99,6 +99,9 @@ export const Tab: FC<{
value={idx + ""}
onClick={() => {
local.activeIndex = idx.toString();
if (local.mode === "hash") {
location.hash = `#${local.activeIndex}`;
}
local.render();
if (e.navigate) {
navigate(e.navigate);

View File

@ -17,10 +17,15 @@ export const Form: FC<{
return (
<FForm {...form_hook}>
<div
<form
className={
"flex-1 flex flex-col w-full items-stretch relative overflow-auto"
}
onSubmit={(e) => {
e.preventDefault();
e.stopPropagation();
on_submit({ form: form.hook.getValues(), error: {} });
}}
>
<div className="absolute inset-0">
<PassProp
@ -31,7 +36,7 @@ export const Form: FC<{
{body}
</PassProp>
</div>
</div>
</form>
</FForm>
);
};

View File

@ -60,7 +60,7 @@ export const List: FC<ListProp> = (_arg) => {
{local.list === null ? (
<ListDummy {..._arg} />
) : (
local.list.map((item, idx) => {
(local.list || []).map((item, idx) => {
const val = (...arg: any[]) => {
const value = get(map_val(item), `${arg.join("")}`);
return value;

View File

@ -11,7 +11,7 @@ import {
} from "react-hook-form"
import { cn } from "@/utils"
import { Label } from "@/comps//ui/label"
import { Label } from "@/comps/ui/label"
const Form = FormProvider

View File

@ -2,6 +2,7 @@ export const getPathname = () => {
if (["localhost", "prasi.avolut.com"].includes(location.hostname)) {
if (
location.pathname.startsWith("/vi") ||
location.pathname.startsWith("/prod") ||
location.pathname.startsWith("/deploy")
) {
return "/" + location.pathname.split("/").slice(3).join("/");