mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
### What problem does this PR solve? Feat: Add agent advanced settings form #3221 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -110,3 +110,18 @@ if (process.env.NODE_ENV !== 'production') {
|
||||
export const BlurInput = React.memo(InnerBlurInput);
|
||||
|
||||
export { ExpandedInput, Input, SearchInput };
|
||||
|
||||
type NumberInputProps = { onChange?(value: number): void } & InputProps;
|
||||
|
||||
export const NumberInput = ({ onChange, ...props }: NumberInputProps) => {
|
||||
return (
|
||||
<Input
|
||||
type="number"
|
||||
onChange={(ev) => {
|
||||
const value = ev.target.value;
|
||||
onChange?.(value === '' ? 0 : Number(value)); // convert to number
|
||||
}}
|
||||
{...props}
|
||||
></Input>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user