-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix form Reset & Form TextArea Style #286
base: main
Are you sure you want to change the base?
Conversation
…rco-design-mobile into fix-form-reset-xzq
@@ -78,14 +92,30 @@ class FormItemInner extends PureComponent<IFormItemInnerProps, IFormItemInnerSta | |||
return this._touched; | |||
}; | |||
|
|||
validateField = (): Promise<IFieldError> => { | |||
getAllRuleValidateTriggers = (): string[] => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个方法还有用吗
import { IRules, ValidatorError } from '@arco-design/mobile-utils'; | ||
|
||
import { IRules, ValidatorError, isArray, isObject } from '@arco-design/mobile-utils'; | ||
import cloneDeepWith from 'lodash/cloneDeepWith'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lodash没加到package.json里?
break; | ||
default: | ||
const originTrigger = children.props[trigger]; | ||
if (triggerPropsField) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个属性好像没有哪里可以传入耶🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 6 out of 12 changed files in this pull request and generated 1 suggestion.
Files not reviewed (6)
- packages/arcodesign/components/form/demo/style/mobile.less: Language not supported
- packages/arcodesign/components/form/style/index.less: Language not supported
- packages/arcodesign/components/input/test/snapshots/index.spec.js.snap: Language not supported
- packages/common-widgets/package-lock.json: Language not supported
- packages/arcodesign/components/form/type.ts: Evaluated as low risk
- packages/arcodesign/components/input/index.tsx: Evaluated as low risk
Comments skipped due to low confidence (2)
packages/arcodesign/components/form/demo/custom-item.md:37
- [nitpick] The key 'names' should be singular to match the convention used in other parts of the code. Consider renaming it to 'name'.
names: [{
packages/arcodesign/components/form/demo/custom-item.md:126
- [nitpick] The placeholder text 'Please input age' should be 'Please input your age' for better clarity.
<Input placeholder="Please input age" clearable border="none" onInput={handleInput}/>
> | ||
<Form.Item field="name" label="UserName" trigger="onBlur" rules={rules.name} required> | ||
<Input placeholder="Please input username" clearable border="none" /> | ||
</Form.Item> | ||
<Form.Item field="age" label="Age" trigger="onInput" rules={[{type: 'number', min: 12, validateLevel: 'warning'}]}> | ||
<Input placeholder="Please input age" clearable border="none" onInput={handleInput}/> | ||
<Form.Item field="age" label="Age" trigger="onInput" rules={[{type: 'number', min: 12, validateLevel: 'warning'}]} initialValue={11}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The initial value for the 'Age' field is set to 11, which violates the validation rule that specifies a minimum value of 12. Change the initial value to 12 or higher.
<Form.Item field="age" label="Age" trigger="onInput" rules={[{type: 'number', min: 12, validateLevel: 'warning'}]} initialValue={11}> | |
<Form.Item field="age" label="Age" trigger="onInput" rules={[{type: 'number', min: 12, validateLevel: 'warning'}]} initialValue={12}> |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
No description provided.