diff --git a/examples/next-ts/hooks/use-controls.tsx b/examples/next-ts/hooks/use-controls.tsx index 2676abb246..df447ee6ee 100644 --- a/examples/next-ts/hooks/use-controls.tsx +++ b/examples/next-ts/hooks/use-controls.tsx @@ -1,4 +1,3 @@ -/* eslint-disable jsx-a11y/no-onchange */ import { ControlRecord, deepGet, deepSet, getControlDefaults } from "@zag-js/shared" import { useState } from "react" @@ -18,7 +17,7 @@ export function useControls(config: T) { ui: () => (
{Object.keys(config).map((key) => { - const { type, label = key, options, placeholder, min, max } = (config[key] ?? {}) as any + const { type, label = key, options, placeholder, min, max, forceValue } = (config[key] ?? {}) as any const value = deepGet(state, key) switch (type) { case "boolean": @@ -67,7 +66,7 @@ export function useControls(config: T) { setState(key, e.target.value) }} > - + {!forceValue && } {options.map((option) => (