Browse Source

remove useless useEffect

czhen 4 years ago
parent
commit
e97349ad79
1 changed files with 0 additions and 6 deletions
  1. 0 6
      client/src/components/advancedSearch/Filter.tsx

+ 0 - 6
client/src/components/advancedSearch/Filter.tsx

@@ -31,12 +31,6 @@ const Filter = function Filter(props: FilterProps) {
   const [isConditionsLegal, setIsConditionsLegal] = useState(false);
   const [filterExpression, setFilterExpression] = useState('');
 
-  useEffect(() => {
-    setInitConditions(flatConditions);
-    // Only need set init conditions after first mount.
-    // eslint-disable-next-line react-hooks/exhaustive-deps
-  }, []);
-
   // Check all conditions are all correct.
   useEffect(() => {
     // Calc the sum of conditions.