]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-22574 Don't forward props from Mantine to Select items
authorDavid Cho-Lerat <david.cho-lerat@sonarsource.com>
Fri, 19 Jul 2024 16:01:25 +0000 (18:01 +0200)
committersonartech <sonartech@sonarsource.com>
Mon, 22 Jul 2024 20:02:46 +0000 (20:02 +0000)
server/sonar-web/src/main/js/apps/projects/components/ProjectsSortingSelect.tsx

index f34ef89f780e71e2e66526b60765d06bd6afd705..cbf6a81d2239ac540559a84987bf4919e5f49541 100644 (file)
@@ -115,18 +115,10 @@ export default class ProjectsSortingSelect extends React.PureComponent<Props> {
   }
 }
 
-const ProjectsSortingSelectItem = React.forwardRef<HTMLDivElement, Option & { className: string }>(
-  ({ className, label, optionClass, short, value, ...props }, ref) => {
-    return (
-      <div
-        className={classNames(`it__project-sort-option-${value}`, className, optionClass)}
-        ref={ref}
-        {...props}
-      >
-        {short ?? label}
-      </div>
-    );
-  },
-);
-
-ProjectsSortingSelectItem.displayName = 'ProjectsSortingSelectItem';
+function ProjectsSortingSelectItem({ label, optionClass, short, value }: Readonly<Option>) {
+  return (
+    <div className={classNames(`it__project-sort-option-${value}`, optionClass)}>
+      {short ?? label}
+    </div>
+  );
+}