Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs edits #3161

Merged
merged 2 commits into from
Nov 16, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/docs-app/src/blueprint.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ It is optimized for building complex data-dense interfaces for desktop applicati
@reactDocs Welcome

<div class="@ns-callout @ns-intent-success @ns-icon-endorsed">
<h4 class="@ns-heading" style="margin: 0">Blueprint 3.0.0 is out now! [See what's new.](#blueprint/whats-new-3.0)</h4>
<h4 class="@ns-heading">Blueprint v3 is available now! [See what's new.](#blueprint/whats-new-3.0)</h4>
</div>

@## Quick start
Expand Down
2 changes: 1 addition & 1 deletion packages/docs-app/src/whats-new-3.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Blueprint 3.0 supports multiple major versions of Blueprint on the same page thr
- Affects `<h1>`-`<h6>`, `<blockquote>`, `<code>`, `<pre>`, `<ol>`, `<ul>`, `<hr>`, `<table>`
- The above elements do not require classes when used inside a container element with `Classes.RUNNING_TEXT`.
- Allow string literals for enums! `<Button intent="success" />`
- New `OverflowList` and `MultiSlider` components.
- Many new components! Look for the <span class="@ns-tag @ns-intent-success @ns-minimal">new</span> tag in the sidebar.
- Complete refactor of documentation content to focus on React usage and de-emphasize CSS/HTML usage.

<a class="@ns-button @ns-intent-primary" href="https://github.com/palantir/blueprint/wiki/3.0-Changelog" target="_blank" style="margin-top: 30px;">
Expand Down
16 changes: 12 additions & 4 deletions packages/select/src/components/select/select-component.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,19 +60,27 @@ See the code sample in [Item List Renderer API](#select/select-component.item-li

@## Controlled usage

The `InputGroup` value is managed by `Select`'s internal state and is not exposed via props. If you would like to control it, you can circumvent `Select` state by passing your `value` state and `onChange` handler to `inputProps`. You can then query the `items` array directly and omit both predicate props.
The input value can be controlled with the `query` and `onQueryChange` props. _Do not use `inputProps` for this;_ the component ignores `inputProps.value` and `inputProps.onChange` in favor of `query` and `onQueryChange` (as noted in the prop documentation).

The focused item (for keyboard interactions) can be controlled with the `activeItem` and `onActiveItemChange` props.

```tsx
// controlling query involves controlling the input and doing your own filtering
<FilmSelect
inputProps={{ value: this.state.myQuery, onChange: this.handleChange }}
items={myFilter(ALL_ITEMS, this.state.myQuery)}
itemRenderer={...}
onItemSelect={...}
// controlled active item
activeItem={this.state.myActiveItem}
onActiveItemChange={this.handleActiveItemChange}
// controlled query
query={this.state.myQuery}
onQueryChange={this.handleQueryChange}
/>
```

This "escape hatch" can be used to implement all sorts of advanced behavior on top of the basic `Select` interactions, such as windowed filtering for large data sets.
This controlled usage allows you to implement all sorts of advanced behavior on
top of the basic `Select` interactions, such as windowed filtering for large
data sets.

@## JavaScript API

Expand Down