mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
### What problem does this PR solve? Feat: Install why-did-you-render to detect component updates #3221 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -73,7 +73,7 @@ const useFormField = () => {
|
||||
};
|
||||
};
|
||||
|
||||
const FormItem = React.forwardRef<
|
||||
const InnerFormItem = React.forwardRef<
|
||||
HTMLDivElement,
|
||||
React.HTMLAttributes<HTMLDivElement>
|
||||
>(({ className, ...props }, ref) => {
|
||||
@ -85,7 +85,10 @@ const FormItem = React.forwardRef<
|
||||
</FormItemContext.Provider>
|
||||
);
|
||||
});
|
||||
FormItem.displayName = 'FormItem';
|
||||
|
||||
InnerFormItem.displayName = 'FormItem';
|
||||
|
||||
const FormItem = React.memo(InnerFormItem);
|
||||
|
||||
const FormLabel = React.forwardRef<
|
||||
React.ElementRef<typeof LabelPrimitive.Root>,
|
||||
|
||||
@ -103,6 +103,10 @@ export const InnerBlurInput = React.forwardRef<
|
||||
);
|
||||
});
|
||||
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
InnerBlurInput.whyDidYouRender = true;
|
||||
}
|
||||
|
||||
export const BlurInput = React.memo(InnerBlurInput);
|
||||
|
||||
export { ExpandedInput, Input, SearchInput };
|
||||
|
||||
Reference in New Issue
Block a user