Skip to content

Work with HeadlessUI / Terracotta #278

Answered by captDaylight
captDaylight asked this question in Q&A
Discussion options

You must be logged in to vote

I ended up solving this with Custom Form Controls.

  const { field, onInput } = createField(props.name); // pass a name into my custom Listbox

// then later
        <Listbox
        ref={field}
        defaultOpen={false}
        value={selected()}
        onSelectChange={(a: any) => {
          setSelected(a);
          onInput(a.name);
        }}
        class="relative shadow-sm rounded-lg"
      >

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by captDaylight
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant