Skip to content

Commit 130d8cf

Browse files
authored
fix README links (#259)
1 parent e1ad1e0 commit 130d8cf

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

README.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,21 @@ https://observablehq.com/@observablehq/inputs
1818

1919
Observable Inputs provides basic inputs:
2020

21-
* [Button](#Button) - do something when a button is clicked
22-
* [Checkbox](#Checkbox) - choose any from a set
23-
* [Toggle](#Toggle) - toggle between two values (on or off)
24-
* [Radio](#Radio) - choose one from a set
25-
* [Range](#Range) - choose a numeric value in a range (slider)
26-
* [Select](#Select) - choose one or many from a set (drop-down menu)
27-
* [Text](#Text) - freeform single-line text input
28-
* [Textarea](#Textarea) - freeform multi-line text input
29-
* [Date](#Date) - date input
30-
* [File](#File) - local file input
21+
* [Button](#button) - do something when a button is clicked
22+
* [Checkbox](#checkbox) - choose any from a set
23+
* [Toggle](#toggle) - toggle between two values (on or off)
24+
* [Radio](#radio) - choose one from a set
25+
* [Range](#range) - choose a numeric value in a range (slider)
26+
* [Select](#select) - choose one or many from a set (drop-down menu)
27+
* [Text](#text) - freeform single-line text input
28+
* [Textarea](#textarea) - freeform multi-line text input
29+
* [Date](#date) - date input
30+
* [File](#file) - local file input
3131

3232
Observable Inputs provides fancy inputs for tabular data:
3333

34-
* [Search](#Search) - query a tabular dataset
35-
* [Table](#Table) - browse a tabular dataset
34+
* [Search](#search) - query a tabular dataset
35+
* [Table](#table) - browse a tabular dataset
3636

3737
Lastly, Inputs provides low-level utilities for more advanced usage:
3838

@@ -92,7 +92,7 @@ The available *options* are:
9292
viewof flavor = Inputs.checkbox(["Salty", "Spicy", "Sour", "Umami"], {label: "Flavor"})
9393
```
9494

95-
[Source](./src/checkbox.js) · [Examples](https://observablehq.com/@observablehq/input-checkbox) · A Checkbox allows the user to choose any of a given set of values (any of the given elements in the iterable *data*). Unlike a [Select](#Select), a Checkbox’s choices are all visible up-front. The Checkbox’s value is an array of the elements from *data* that are currently selected.
95+
[Source](./src/checkbox.js) · [Examples](https://observablehq.com/@observablehq/input-checkbox) · A Checkbox allows the user to choose any of a given set of values (any of the given elements in the iterable *data*). Unlike a [Select](#select), a Checkbox’s choices are all visible up-front. The Checkbox’s value is an array of the elements from *data* that are currently selected.
9696

9797
The elements in *data* need not be strings; they can be anything. To customize display, optional *keyof* and *valueof* functions may be given; the result of the *keyof* function for each element in *data* is displayed to the user, while the result of the *valueof* function is exposed in the Checkbox’s value when selected. If *data* is a Map, the *keyof* function defaults to the map entry’s key (`([key]) => key`) and the *valueof* function defaults to the map entry’s value (`([, value]) => value`); otherwise, both *keyof* and *valueof* default to the identity function (`d => d`). For example, with [d3.group](https://github.com/d3/d3-array/blob/master/README.md#group):
9898

@@ -141,7 +141,7 @@ The available *options* are:
141141
viewof color = Inputs.radio(["red", "green", "blue"], {label: "Color"})
142142
```
143143

144-
[Source](./src/checkbox.js) · [Examples](https://observablehq.com/@observablehq/input-radio) · A Radio allows the user to choose one of a given set of values. Unlike a [Select](#Select), a Radio’s choices are all visible up-front. The Radio’s value is an element from *data*, or null if no choice has been made.
144+
[Source](./src/checkbox.js) · [Examples](https://observablehq.com/@observablehq/input-radio) · A Radio allows the user to choose one of a given set of values. Unlike a [Select](#select), a Radio’s choices are all visible up-front. The Radio’s value is an element from *data*, or null if no choice has been made.
145145

146146
The elements in *data* need not be strings; they can be anything. To customize display, optional *keyof* and *valueof* functions may be given; the result of the *keyof* function for each element in *data* is displayed to the user, while the result of the *valueof* function is exposed as the Radio’s value when selected. If *data* is a Map, the *keyof* function defaults to the map entry’s key (`([key]) => key`) and the *valueof* function defaults to the map entry’s value (`([, value]) => value`); otherwise, both *keyof* and *valueof* default to the identity function (`d => d`). For example, with [d3.group](https://github.com/d3/d3-array/blob/master/README.md#group):
147147

@@ -210,7 +210,7 @@ Equivalent to Inputs.range, except the range input is suppressed; only a number
210210
viewof foundAthletes = Inputs.search(athletes, {label: "Athletes"})
211211
```
212212

213-
[Source](./src/search.js) · [Examples](https://observablehq.com/@observablehq/input-search) · A Search input allows freeform, full-text search of an in-memory tabular dataset or an iterable (column) of values using a simple query parser. It is often used in conjunction with a [Table](#Table). The value of a Search is an array of elements from the iterable *data* that match the current query. If the query is currently empty, the search input’s value is all elements in *data*.
213+
[Source](./src/search.js) · [Examples](https://observablehq.com/@observablehq/input-search) · A Search input allows freeform, full-text search of an in-memory tabular dataset or an iterable (column) of values using a simple query parser. It is often used in conjunction with a [Table](#table). The value of a Search is an array of elements from the iterable *data* that match the current query. If the query is currently empty, the search input’s value is all elements in *data*.
214214

215215
A Search input can work with either tabular data (an array of objects) or a single column (an array of strings). When searching tabular input, all properties on each object in *data* are searched by default, but you can limit the search to a specific set of properties using the *column* option. For example, to only search the “sport” and “nationality” column:
216216

@@ -256,7 +256,7 @@ viewof size = Inputs.select(["Small", "Medium", "Large"], {label: "Size"})
256256
viewof inks = Inputs.select(["cyan", "magenta", "yellow", "black"], {multiple: true, label: "Inks"})
257257
```
258258

259-
[Source](./src/select.js) · [Examples](https://observablehq.com/@observablehq/input-select) · A Select allows the user to choose one of a given set of values (one of the given elements in the iterable *data*); or, if desired, multiple values may be chosen. Unlike a [Radio](#Radio), only one (or a few) choices are visible up-front, affording a compact display even when many options are available. If multiple choice is allowed via the *multiple* option, the Select’s value is an array of the elements from *data* that are currently selected; if single choice is required, the Select’s value is an element from *data*, or null if no choice has been made.
259+
[Source](./src/select.js) · [Examples](https://observablehq.com/@observablehq/input-select) · A Select allows the user to choose one of a given set of values (one of the given elements in the iterable *data*); or, if desired, multiple values may be chosen. Unlike a [Radio](#radio), only one (or a few) choices are visible up-front, affording a compact display even when many options are available. If multiple choice is allowed via the *multiple* option, the Select’s value is an array of the elements from *data* that are currently selected; if single choice is required, the Select’s value is an element from *data*, or null if no choice has been made.
260260

261261
The elements in *data* need not be strings; they can be anything. To customize display, optional *keyof* and *valueof* functions may be given; the result of the *keyof* function for each element in *data* is displayed to the user, while the result of the *valueof* function is exposed as the Select’s value when selected. If *data* is a Map, the *keyof* function defaults to the map entry’s key (`([key]) => key`) and the *valueof* function defaults to the map entry’s value (`([, value]) => value`); otherwise, both *keyof* and *valueof* default to the identity function (`d => d`). For example, with [d3.group](https://github.com/d3/d3-array/blob/master/README.md#group):
262262

@@ -289,7 +289,7 @@ The available *options* are:
289289

290290
[Source](./src/table.js) · [Examples](https://observablehq.com/@observablehq/input-table) · A Table displays a tabular dataset; *data* should be an iterable of objects, such as the result of loading a CSV file. The *data* may also be a promise to the same, in which case the contents of the table will be lazily populated once the promise resolves. Each object corresponds to a row, while each field corresponds to a column. To improve performance with large datasets, the rows of the table are lazily rendered on scroll. Rows may be sorted by clicking column headers (once for ascending, then again for descending).
291291

292-
While intended primarily for display, a Table also serves as an input. The value of the Table is its selected rows: a filtered (and possibly sorted) view of the *data*. If the *data* is specified as a promise, while the promise is unresolved, the table’s value is undefined and attempting to set the value of the table will throw an error. Rows can be selected by clicking or shift-clicking checkboxes. See also [Search](#Search), which can be used for rapid filtering of the table’s rows.
292+
While intended primarily for display, a Table also serves as an input. The value of the Table is its selected rows: a filtered (and possibly sorted) view of the *data*. If the *data* is specified as a promise, while the promise is unresolved, the table’s value is undefined and attempting to set the value of the table will throw an error. Rows can be selected by clicking or shift-clicking checkboxes. See also [Search](#search), which can be used for rapid filtering of the table’s rows.
293293

294294
By default, the Table infers the type of each column by inspecting values, assuming that non-null values in each column have consistent types. Numbers are formatted in the specified *locale*; dates are formatted in ISO 8601 UTC. Numbers columns are further right-aligned with [tabular figures](https://practicaltypography.com/alternate-figures.html) to assist comparison. The *format* and *align* of each column can be customized as options if desired.
295295

@@ -325,7 +325,7 @@ If *width* is “auto”, the table width will be based on the table contents; n
325325
viewof name = Inputs.text({label: "Name", placeholder: "Enter your name"})
326326
```
327327

328-
[Source](./src/text.js) · [Examples](https://observablehq.com/@observablehq/input-text) · A Text allows freeform single-line text input. For example, a Text might be used to allow the user to enter a search query. (See also [Search](#Search).) By default, a Text will report its value immediately on input. If more deliberate behavior is desired, say if the input will trigger an expensive computation or remote API, the *submit* option can be set to true to wait until a button is clicked or the Enter key is pressed.
328+
[Source](./src/text.js) · [Examples](https://observablehq.com/@observablehq/input-text) · A Text allows freeform single-line text input. For example, a Text might be used to allow the user to enter a search query. (See also [Search](#search).) By default, a Text will report its value immediately on input. If more deliberate behavior is desired, say if the input will trigger an expensive computation or remote API, the *submit* option can be set to true to wait until a button is clicked or the Enter key is pressed.
329329

330330
The available *options* are:
331331

@@ -525,20 +525,20 @@ If *invalidation* is specified, it is a promise; when the promise resolves, the
525525

526526
#### Inputs.searchFilter(*query*)
527527

528-
[Source](./src/search.js) · The default query parser used by [Search](#Search).
528+
[Source](./src/search.js) · The default query parser used by [Search](#search).
529529

530530
#### Inputs.formatLocaleAuto(*locale*)
531531

532-
[Source](./src/format.js) · Returns a function that formats a given *value* as a string according to the specified *locale*. If *locale* is not specified, it defaults to English. If *value* is null, returns the empty string; if *value* is a number, calls [formatLocaleNumber](#formatLocaleNumber) if *value* is a date, calls [formatDate](#formatDate); otherwise coerces *value* to a string. The default formatter used by [Table](#Table).
532+
[Source](./src/format.js) · Returns a function that formats a given *value* as a string according to the specified *locale*. If *locale* is not specified, it defaults to English. If *value* is null, returns the empty string; if *value* is a number, calls [formatLocaleNumber](#formatLocaleNumber) if *value* is a date, calls [formatDate](#formatDate); otherwise coerces *value* to a string. The default formatter used by [Table](#table).
533533

534534
#### Inputs.formatLocaleNumber(*locale*)
535535

536-
[Source](./src/format.js) · Returns a function that formats a given *number* as a string according to the specified *locale*. The default number formatter used by [Table](#Table).
536+
[Source](./src/format.js) · Returns a function that formats a given *number* as a string according to the specified *locale*. The default number formatter used by [Table](#table).
537537

538538
#### Inputs.formatTrim(*number*)
539539

540-
[Source](./src/format.js) · The default number formatter used by [Range](#Range).
540+
[Source](./src/format.js) · The default number formatter used by [Range](#range).
541541

542542
#### Inputs.formatDate(*date*)
543543

544-
[Source](./src/format.js) · The default date formatter used by [Table](#Table).
544+
[Source](./src/format.js) · The default date formatter used by [Table](#table).

0 commit comments

Comments
 (0)