This commit is contained in:
karimaldeen 2024-09-15 16:28:30 +03:00
parent fe6e8aae95
commit cea1277edb
8 changed files with 26 additions and 8 deletions

View File

@ -18,7 +18,6 @@ const SearchField: React.FC<Props> = ({ placeholder, searchBy }) => {
const handleInputChange = (value: string) => {
setSearchQuery(value);
};
console.log(searchBy,"searchBy");
const handleInputChangeWithDebounce = useDebounce((value: string) => {
setFilter({

View File

@ -47,6 +47,7 @@ const TextField = ({
showCount
maxLength={1000}
autoSize={{ minRows: 4, maxRows: 10 }}
onChange={onChange || TextFilehandleChange}
id={name}
{...props}

View File

@ -60,7 +60,8 @@ const TextField = ({
showCount
maxLength={1000}
onChange={onChange || TextFilehandleChange}
style={{ height: 120 }}
autoSize={{ minRows: 4, maxRows: 10 }}
id={id}
/>
</Form.Item>

View File

@ -60,7 +60,7 @@ const TextField = ({
showCount
maxLength={1000}
onChange={onChange || TextFilehandleChange}
style={{ height: 120 }}
autoSize={{ minRows: 4, maxRows: 10 }}
/>
</Form.Item>
</div>

View File

@ -59,7 +59,7 @@ const TextField = ({
showCount
maxLength={1000}
onChange={onChange || TextFilehandleChange}
style={{ height: 120 }}
autoSize={{ minRows: 4, maxRows: 10 }}
/>
</Form.Item>
</div>

View File

@ -62,6 +62,7 @@
transition: 1s ease-in-out;
animation: fadeInRight 1s ease-in-out;
max-height: 90vh;
min-height: 90vh;
overflow-y: scroll;
@include Scrollbar;

View File

@ -3,9 +3,6 @@ import useAxios from "./useAxios";
import { useLocation } from "react-router-dom";
import { PaginationParams } from "../utils/PaginationParams";
import { filterParams } from "../utils/filterParams";
import useAuthState from "../../zustand/AuthState";
import { useFilterStateState } from "../../zustand/Filter";
function useGetQuery(
KEY: string | string[],
url: string,
@ -19,7 +16,10 @@ function useGetQuery(
const { page, per_page } = PaginationParams(location);
console.log(remainingParams)
const paramToSend = pagination
? { page: page, per_page: per_page, ...remainingParams }
: { ...remainingParams };

16
src/utils/shallowEqual.ts Normal file
View File

@ -0,0 +1,16 @@
export function shallowEqual(obj1: any, obj2: any): boolean {
const keys1 = Object.keys(obj1);
const keys2 = Object.keys(obj2);
if (keys1.length !== keys2.length) {
return false;
}
for (const key of keys1) {
if (obj1[key] !== obj2[key]) {
return false;
}
}
return true;
}