mirror of
https://github.com/element-plus/element-plus.git
synced 2025-08-26 12:32:17 +08:00
refactor(components): [form] enhance scrollIntoViewOptions
type (#21552)
This commit is contained in:
@ -144,7 +144,7 @@ form/accessibility
|
||||
| size | Control the size of components in this form. | ^[enum]`'' \| 'large' \| 'default' \| 'small'` | — |
|
||||
| disabled | Whether to disable all components in this form. If set to `true`, it will override the `disabled` prop of the inner component. | ^[boolean] | false |
|
||||
| scroll-to-error | When validation fails, scroll to the first error form entry. | ^[boolean] | false |
|
||||
| scroll-into-view-options ^(2.3.2) | When validation fails, it scrolls to the first error item based on the scrollIntoView option. [scrollIntoView](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView). | ^[object]`Record<string, any>` / ^[boolean] | true |
|
||||
| scroll-into-view-options ^(2.3.2) | When validation fails, it scrolls to the first error item based on the scrollIntoView option. [scrollIntoView](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView). | ^[object]`ScrollIntoViewOptions` / ^[boolean] | true |
|
||||
|
||||
### Form Events
|
||||
|
||||
|
@ -105,7 +105,7 @@ export const formProps = buildProps({
|
||||
* @description When validation fails, it scrolls to the first error item based on the scrollIntoView option.
|
||||
*/
|
||||
scrollIntoViewOptions: {
|
||||
type: [Object, Boolean],
|
||||
type: definePropType<ScrollIntoViewOptions | boolean>([Object, Boolean]),
|
||||
default: true,
|
||||
},
|
||||
} as const)
|
||||
|
Reference in New Issue
Block a user