focusDefaultPropsPath()v4.0.165
Scrolls to a specific field in the default props editor.
Example
For the following Zod schema:
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 (),}),),});
Call focusDefaultPropsPath()
with the path to the field you want to focus on:
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
The path to the field you want to focus on. An array containing numbers and strings.
scrollBehavior
The behavior of the scrolling.
One of "auto" | "instant" | "smooth"
.
Defaults to the default scroll behavior.