focusDefaultPropsPath()v4.0.165
滚动到默认属性编辑器中的特定字段。
🌐 Scrolls to a specific field in the default props editor.
示例
🌐 Example
对于以下 Zod 模式:
🌐 For the following Zod schema:
schema.tsimport {z } from "zod"; constMySchema =z .object ({array :z .array (z .object ({subfield :z .string (), }), ), });
调用 focusDefaultPropsPath() 并传入你想要聚焦的字段的路径:
🌐 Call focusDefaultPropsPath() with the path to the field you want to focus on:
MyComp.tsximport {focusDefaultPropsPath } from "@remotion/studio";focusDefaultPropsPath ({path : ["array", 0, "subfield"], });
应用编程接口
🌐 API
path
通向你想专注的字段的路径。一个包含数字和字符串的数组。
🌐 The path to the field you want to focus on. An array containing numbers and strings.
scrollBehavior
滚动的行为。
其中之一 "auto" | "instant" | "smooth"。
默认为 默认滚动行为。
🌐 The behavior of the scrolling.
One of "auto" | "instant" | "smooth".
Defaults to the default scroll behavior.
另请参阅
🌐 See also