a bug fixed
parent
5ecf47e3d1
commit
a97d4ae1a9
|
|
@ -54,7 +54,7 @@ export default function InspectorOperations({
|
|||
}) {
|
||||
const [file, setFile] = useState<File[]>([]);
|
||||
const [check, setCheck] = useState<any>(false);
|
||||
const [charCount, setCharCount] = useState(0);
|
||||
const [charCount, setCharCount] = useState<any>(0);
|
||||
|
||||
// Queries
|
||||
const { data, isLoading, refetch } = useQuery({
|
||||
|
|
@ -134,7 +134,11 @@ export default function InspectorOperations({
|
|||
|
||||
// Add the useEffect hook to monitor changes in the description field
|
||||
useEffect(() => {
|
||||
setCharCount(form.watch("text")?.length);
|
||||
const text = form.watch("text") as string;
|
||||
if (charCount != 0) {
|
||||
setCharCount(text?.length);
|
||||
console.log(charCount);
|
||||
}
|
||||
}, [form.watch("text")]);
|
||||
|
||||
function handleTextChange(event: React.ChangeEvent<HTMLTextAreaElement>) {
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "sootzani",
|
||||
"version": "0.2.21",
|
||||
"version": "0.2.22",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "sootzani",
|
||||
"version": "0.2.21",
|
||||
"version": "0.2.22",
|
||||
"dependencies": {
|
||||
"@hookform/resolvers": "^3.3.2",
|
||||
"@microsoft/signalr": "^8.0.0",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "sootzani",
|
||||
"version": "0.2.21",
|
||||
"version": "0.2.22",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
|
|
|
|||
Loading…
Reference in New Issue