Skip to content

[Bug] SelectorShowcase docsite example is non-interactive — no value + no-op onChange (state not propagating) #3189

Description

@cixzhang

File: packages/cli/templates/blocks/components/Selector/SelectorShowcase.tsx

Problem: The main Selector showcase rendered on the docsite is a controlled component with no state. It passes no value and a no-op onChange={() => {}}, so choosing an option never updates the displayed selection — the selector appears broken. More noticeable on touch/mobile.

export default function SelectorShowcase() {
  return (
    <Selector
      label="Fruit"
      options={['Apple', 'Banana', 'Orange', 'Mango', 'Pineapple']}
      placeholder="Select a fruit..."
      onChange={() => {}}
    />
  );
}

Expected: Wire local state like the other Selector examples (SelectorClearable, SelectorWithSections, etc.) already do:

const [value, setValue] = useState<string | undefined>();
return <Selector label="Fruit" options={...} value={value} onChange={setValue} placeholder="Select a fruit..." />;

Note: This is NOT a component bug or a mobile-responsiveness bug — it's the showcase example not propagating state.


Reported via external user feedback relayed through Astryx (an X commenter testing on mobile).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocumentationImprovements or additions to documentation

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions