docs(all): possible values are extracted by stencil (#16190)

* docs(all): possible values are extracted by stencil

* add defaults

* remove all hardcoded defaults

* update stencil
This commit is contained in:
Manu MA
2018-11-02 00:06:40 +01:00
committed by GitHub
parent 335acf96ee
commit ecc2c55370
151 changed files with 1363 additions and 1430 deletions

View File

@@ -41,30 +41,30 @@ Since select uses the alert, action sheet and popover interfaces, options can be
## Properties
| Property | Attribute | Description | Type |
| ------------------ | --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- |
| `cancelText` | `cancel-text` | The text to display on the cancel button. Default: `Cancel`. | `string` |
| `disabled` | `disabled` | If `true`, the user cannot interact with the select. Defaults to `false`. | `boolean` |
| `interfaceOptions` | -- | Any additional options that the `alert`, `action-sheet` or `popover` interface can take. See the [AlertController API docs](../../alert/AlertController/#create), the [ActionSheetController API docs](../../action-sheet/ActionSheetController/#create) and the [PopoverController API docs](../../popover/PopoverController/#create) for the create options for each interface. | `any` |
| `interface` | `interface` | The interface the select should use: `action-sheet`, `popover` or `alert`. Default: `alert`. | `"action-sheet" \| "alert" \| "popover"` |
| `mode` | `mode` | The mode determines which platform styles to use. Possible values are: `"ios"` or `"md"`. | `"ios" \| "md"` |
| `multiple` | `multiple` | If `true`, the select can accept multiple values. | `boolean` |
| `name` | `name` | The name of the control, which is submitted with the form data. | `string` |
| `okText` | `ok-text` | The text to display on the ok button. Default: `OK`. | `string` |
| `placeholder` | `placeholder` | The text to display when the select is empty. | `null \| string \| undefined` |
| `selectedText` | `selected-text` | The text to display instead of the selected option's value. | `null \| string \| undefined` |
| `value` | -- | the value of the select. | `any` |
| Property | Attribute | Description | Type | Default |
| ------------------ | --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- | -------------- |
| `cancelText` | `cancel-text` | The text to display on the cancel button. | `string` | `'Cancel'` |
| `disabled` | `disabled` | If `true`, the user cannot interact with the select. | `boolean` | `false` |
| `interfaceOptions` | -- | Any additional options that the `alert`, `action-sheet` or `popover` interface can take. See the [AlertController API docs](../../alert/AlertController/#create), the [ActionSheetController API docs](../../action-sheet/ActionSheetController/#create) and the [PopoverController API docs](../../popover/PopoverController/#create) for the create options for each interface. | `any` | `{}` |
| `interface` | `interface` | The interface the select should use: `action-sheet`, `popover` or `alert`. | `"action-sheet" \| "alert" \| "popover"` | `'alert'` |
| `mode` | `mode` | The mode determines which platform styles to use. | `"ios" \| "md"` | `undefined` |
| `multiple` | `multiple` | If `true`, the select can accept multiple values. | `boolean` | `false` |
| `name` | `name` | The name of the control, which is submitted with the form data. | `string` | `this.inputId` |
| `okText` | `ok-text` | The text to display on the ok button. | `string` | `'OK'` |
| `placeholder` | `placeholder` | The text to display when the select is empty. | `null \| string \| undefined` | `undefined` |
| `selectedText` | `selected-text` | The text to display instead of the selected option's value. | `null \| string \| undefined` | `undefined` |
| `value` | -- | the value of the select. | `any` | `undefined` |
## Events
| Event | Detail | Description |
| ----------- | ---------------------- | ---------------------------------------- |
| `ionBlur` | | Emitted when the select loses focus. |
| `ionCancel` | | Emitted when the selection is cancelled. |
| `ionChange` | SelectInputChangeEvent | Emitted when the value has changed. |
| `ionFocus` | | Emitted when the select has focus. |
| `ionStyle` | StyleEvent | Emitted when the styles change. |
| Event | Description | Detail |
| ----------- | ---------------------------------------- | ---------------------- |
| `ionBlur` | Emitted when the select loses focus. | void |
| `ionCancel` | Emitted when the selection is cancelled. | void |
| `ionChange` | Emitted when the value has changed. | SelectInputChangeEvent |
| `ionFocus` | Emitted when the select has focus. | void |
| `ionStyle` | Emitted when the styles change. | StyleEvent |
## Methods

View File

@@ -31,22 +31,21 @@ export class Select implements ComponentInterface {
/**
* The mode determines which platform styles to use.
* Possible values are: `"ios"` or `"md"`.
*/
@Prop() mode!: Mode;
/**
* If `true`, the user cannot interact with the select. Defaults to `false`.
* If `true`, the user cannot interact with the select.
*/
@Prop() disabled = false;
/**
* The text to display on the cancel button. Default: `Cancel`.
* The text to display on the cancel button.
*/
@Prop() cancelText = 'Cancel';
/**
* The text to display on the ok button. Default: `OK`.
* The text to display on the ok button.
*/
@Prop() okText = 'OK';
@@ -71,7 +70,7 @@ export class Select implements ComponentInterface {
@Prop() multiple = false;
/**
* The interface the select should use: `action-sheet`, `popover` or `alert`. Default: `alert`.
* The interface the select should use: `action-sheet`, `popover` or `alert`.
*/
@Prop() interface: SelectInterface = 'alert';