filal update
This commit is contained in:
@@ -98,7 +98,6 @@ const FormField = ({
|
||||
textAlign={arabic ? "right" : "left"}
|
||||
_placeholder={{ fontSize: "sm" }}
|
||||
rounded={"sm"}
|
||||
// defaultValue={value}
|
||||
>
|
||||
{options.map((option, index) => (
|
||||
<option key={index} value={option.value}>
|
||||
@@ -476,7 +475,9 @@ const FormField = ({
|
||||
textAlign={arabic || type === "number" ? "right" : align ? align : "left"}
|
||||
_placeholder={{ fontSize: "sm" }}
|
||||
min={type === "date" ? today : undefined}
|
||||
defaultValue={type === "date" ? new Date(value) : undefined}
|
||||
// defaultValue={type === "date" && "2023-07-26" : undefined}
|
||||
// value={"2023-07-26"}
|
||||
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Box, Button, Divider, Heading, Spinner } from "@chakra-ui/react";
|
||||
import { Box, Button, Divider, FormHelperText, Heading, Spinner, Text } from "@chakra-ui/react";
|
||||
import React from "react";
|
||||
import FormField from "./FormField";
|
||||
import { OPACITY_ON_LOAD } from "../Layout/animations";
|
||||
@@ -83,7 +83,7 @@ const FormInputMain = ({
|
||||
handleImageChange={handleImageChange}
|
||||
removeImage={removeImage}
|
||||
width={width}
|
||||
value={value}
|
||||
value={type === "date" ? null :value}
|
||||
handleInputChange={handleInputChange}
|
||||
align={align}
|
||||
maxLength={maxLength}
|
||||
@@ -91,6 +91,7 @@ const FormInputMain = ({
|
||||
)
|
||||
)}
|
||||
</Box>
|
||||
|
||||
{index < Object.entries(groupedFields).length - 1 && <Divider />}
|
||||
</Box>
|
||||
))}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Box, Button, Divider, FormLabel, Heading, Image, Input, InputGroup, InputRightAddon, Table, Tbody, Td, Th, Thead, Tr } from "@chakra-ui/react";
|
||||
import { Box, Button, Divider, FormHelperText, FormLabel, Heading, Image, Input, InputGroup, InputRightAddon, Table, Tbody, Td, Th, Thead, Tr } from "@chakra-ui/react";
|
||||
import React from "react";
|
||||
|
||||
const FormInputView = ({
|
||||
@@ -120,9 +120,11 @@ const FormInputView = ({
|
||||
>
|
||||
{type === "number" ? value : value}
|
||||
</FormLabel>
|
||||
|
||||
</Box>
|
||||
)
|
||||
)}
|
||||
|
||||
</Box>
|
||||
{/* </Box> */}
|
||||
{index <
|
||||
@@ -130,6 +132,7 @@ const FormInputView = ({
|
||||
<Divider />
|
||||
)}
|
||||
</Box>
|
||||
|
||||
)
|
||||
)}
|
||||
{children}
|
||||
|
||||
Reference in New Issue
Block a user