focusDefaultPropsPath()v4.0.165
滚动到默认属性编辑器中的特定字段。
示例
对于以下 Zod 模式:
schema.tstsx
import {z } from "zod";constMySchema =z .object ({array :z .array (z .object ({subfield :z .string (),}),),});
schema.tstsx
import {z } from "zod";constMySchema =z .object ({array :z .array (z .object ({subfield :z .string (),}),),});
调用 focusDefaultPropsPath()
并提供要关注的字段的路径:
MyComp.tsxtsx
import {focusDefaultPropsPath } from "@remotion/studio";focusDefaultPropsPath ({path : ["array", 0, "subfield"],});
MyComp.tsxtsx
import {focusDefaultPropsPath } from "@remotion/studio";focusDefaultPropsPath ({path : ["array", 0, "subfield"],});
API
path
要关注的字段的路径。包含数字和字符串的数组。
scrollBehavior
滚动行为。
其中之一为 "auto" | "instant" | "smooth"
。
默认为默认滚动行为。