소스 검색

Changed filter of search.

Malav Mevada 2 년 전
부모
커밋
51a9749a2f
1개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 2
      kafka-ui-react-app/src/components/Brokers/Broker/Configs/Configs.tsx

+ 1 - 2
kafka-ui-react-app/src/components/Brokers/Broker/Configs/Configs.tsx

@@ -36,8 +36,7 @@ const Configs: React.FC = () => {
     return data
       .filter((item) => {
         const nameMatch = item.name.toLocaleLowerCase().includes(keyword);
-        const valueMatch = item.value && item.value.includes(keyword);
-        return nameMatch || valueMatch;
+        return nameMatch ? true : item.value && item.value.includes(keyword); // try to match the keyword on any of the item.value elements when nameMatch fails but item.value exists
       })
       .sort((a, b) => {
         if (a.source === b.source) return 0;