浏览代码

Update Configs.tsx

Added line breaks in getData() method to avoid linter warnings.
Malav Mevada 1 年之前
父节点
当前提交
7f14ad45ea
共有 1 个文件被更改,包括 16 次插入9 次删除
  1. 16 9
      kafka-ui-react-app/src/components/Brokers/Broker/Configs/Configs.tsx

+ 16 - 9
kafka-ui-react-app/src/components/Brokers/Broker/Configs/Configs.tsx

@@ -33,15 +33,22 @@ const Configs: React.FC = () => {
   );
 
   const getData = () => {
-  	return data
-  		.filter((item) => {
-  			const nameMatch = item.name.toLocaleLowerCase().includes(keyword.toLocaleLowerCase());
-  			return nameMatch ? true : item.value && item.value.toLocaleLowerCase().includes(keyword.toLocaleLowerCase()); // 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;
-  			return a.source === ConfigSource.DYNAMIC_BROKER_CONFIG ? -1 : 1;
-  		});
+    return data
+      .filter((item) => {
+        const nameMatch = item.name
+          .toLocaleLowerCase()
+          .includes(keyword.toLocaleLowerCase());
+        return nameMatch
+          ? true
+          : item.value &&
+              item.value
+                .toLocaleLowerCase()
+                .includes(keyword.toLocaleLowerCase()); // 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;
+        return a.source === ConfigSource.DYNAMIC_BROKER_CONFIG ? -1 : 1;
+      });
   };
 
   const dataSource = React.useMemo(() => getData(), [data, keyword]);