patternfly / patternfly/patternfly-react

Templates(select) - improve documentation around initial selections

Open
#10,842 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

PF Team Stale
Dominant language
TypeScript
Stars
862
Forks
392
Avg merge
4d 8h
Merged PRs (30d)
9

Description

The docs aren't clear about how to go about setting an initial selection for the different selects. It is the same pattern, and the examples use it (setting a selected prop on an option), but it would be helpful to explain this in the docs.

Also, currently you can still pass selected to the templates because the props tables extend SelectProps, but this is currently nonfunctional to a user since state is managed internally. My thought is we can exclude the prop from the extension, and potentially add an initialSelection prop as a more direct way of setting an initial selection (and an alternative to the option prop method that currently exists).


Jira Issue: PF-34

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the template documentation, its select examples, and the props tables extending SelectProps; start by comparing how the existing selected option pattern is described across the different selects. Done means the initial-selection behavior is clearly documented and the API treatment of selected versus a possible initialSelection prop is resolved and reflected consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
documentation, frontend
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.