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