docs(menu-toggle): default behaviour docs

fixes #15042
This commit is contained in:
Manu Mtz.-Almeida
2018-08-07 20:23:23 +02:00
parent 2c191d76d3
commit 4e565926cd
10 changed files with 73 additions and 32 deletions

View File

@ -1305,11 +1305,11 @@ declare global {
interface IonMenuToggle { interface IonMenuToggle {
/** /**
* Automatically hides the content when the corresponding menu is not active * Automatically hides the content when the corresponding menu is not active. By default, it's `true`. Change it to `false` in order to keep `ion-menu-toggle` always visible regardless the state of the menu.
*/ */
'autoHide': boolean; 'autoHide': boolean;
/** /**
* Optional property that maps to a Menu's `menuId` prop. Can also be `left` or `right` for the menu side. This is used to find the correct menu to toggle * Optional property that maps to a Menu's `menuId` prop. Can also be `start` or `end` for the menu side. This is used to find the correct menu to toggle. If this property is not used, `ion-menu-toggle` will toggle the first menu that is active.
*/ */
'menu': string; 'menu': string;
} }
@ -4285,7 +4285,7 @@ declare global {
*/ */
'onIonCancel'?: (event: CustomEvent<void>) => void; 'onIonCancel'?: (event: CustomEvent<void>) => void;
/** /**
* Emitted when the checked property has changed. * Emitted when the value (selected date) has changed.
*/ */
'onIonChange'?: (event: CustomEvent<void>) => void; 'onIonChange'?: (event: CustomEvent<void>) => void;
/** /**
@ -4862,11 +4862,11 @@ declare global {
export interface IonMenuToggleAttributes extends HTMLAttributes { export interface IonMenuToggleAttributes extends HTMLAttributes {
/** /**
* Automatically hides the content when the corresponding menu is not active * Automatically hides the content when the corresponding menu is not active. By default, it's `true`. Change it to `false` in order to keep `ion-menu-toggle` always visible regardless the state of the menu.
*/ */
'autoHide'?: boolean; 'autoHide'?: boolean;
/** /**
* Optional property that maps to a Menu's `menuId` prop. Can also be `left` or `right` for the menu side. This is used to find the correct menu to toggle * Optional property that maps to a Menu's `menuId` prop. Can also be `start` or `end` for the menu side. This is used to find the correct menu to toggle. If this property is not used, `ion-menu-toggle` will toggle the first menu that is active.
*/ */
'menu'?: string; 'menu'?: string;
} }
@ -5051,6 +5051,9 @@ declare global {
export interface IonPickerColumnAttributes extends HTMLAttributes { export interface IonPickerColumnAttributes extends HTMLAttributes {
'col'?: PickerColumn; 'col'?: PickerColumn;
/**
* Emitted when the selected option has changed.
*/
'onIonChange'?: (event: CustomEvent<void>) => void; 'onIonChange'?: (event: CustomEvent<void>) => void;
} }

View File

@ -32,6 +32,14 @@ The icon to use.
Possible values are the same as `"ion-icon"`. Possible values are the same as `"ion-icon"`.
#### src
string
The icon src to use.
Possible values are the same as `"ion-icon"`.
## Attributes ## Attributes
#### color #### color
@ -59,6 +67,14 @@ The icon to use.
Possible values are the same as `"ion-icon"`. Possible values are the same as `"ion-icon"`.
#### src
string
The icon src to use.
Possible values are the same as `"ion-icon"`.
---------------------------------------------- ----------------------------------------------

View File

@ -192,7 +192,7 @@ export class Datetime {
@Event() ionCancel!: EventEmitter<void>; @Event() ionCancel!: EventEmitter<void>;
/** /**
* Emitted when the checked property has changed. * Emitted when the value (selected date) has changed.
*/ */
@Event() ionChange!: EventEmitter<void>; @Event() ionChange!: EventEmitter<void>;

View File

@ -571,6 +571,11 @@ recent leap years, then this input's value would be `yearValues="2024,2020,2016,
Emitted when the datetime selection was cancelled. Emitted when the datetime selection was cancelled.
#### ionChange
Emitted when the value (selected date) has changed.
#### ionStyle #### ionStyle
Emitted when the styles change. Emitted when the styles change.

View File

@ -13,13 +13,19 @@ export class MenuToggle {
/** /**
* Optional property that maps to a Menu's `menuId` prop. * Optional property that maps to a Menu's `menuId` prop.
* Can also be `left` or `right` for the menu side. * Can also be `start` or `end` for the menu side.
* This is used to find the correct menu to toggle * This is used to find the correct menu to toggle.
*
* If this property is not used, `ion-menu-toggle` will toggle the
* first menu that is active.
*/ */
@Prop() menu?: string; @Prop() menu?: string;
/** /**
* Automatically hides the content when the corresponding menu is not active * Automatically hides the content when the corresponding menu is not active.
*
* By default, it's `true`. Change it to `false` in order to
* keep `ion-menu-toggle` always visible regardless the state of the menu.
*/ */
@Prop() autoHide = true; @Prop() autoHide = true;

View File

@ -1,6 +1,10 @@
# ion-menu-toggle # ion-menu-toggle
The MenuToggle component can be used to toggle a menu open or closed. The MenuToggle component can be used to toggle a menu open or closed.
By default, it's only visible when the selected menu is active. A menu is active when it can be opened/closed. If the menu is disabled or it's being presented as a split-pane, the menu is marked as non-active and ion-menu-toggle hides itself.
In case it's desired to keep `ion-menu-toggle` always visible, the `autoHide` property can be set to `false`.
<!-- Auto Generated Below --> <!-- Auto Generated Below -->
@ -11,7 +15,10 @@ The MenuToggle component can be used to toggle a menu open or closed.
boolean boolean
Automatically hides the content when the corresponding menu is not active Automatically hides the content when the corresponding menu is not active.
By default, it's `true`. Change it to `false` in order to
keep `ion-menu-toggle` always visible regardless the state of the menu.
#### menu #### menu
@ -19,8 +26,11 @@ Automatically hides the content when the corresponding menu is not active
string string
Optional property that maps to a Menu's `menuId` prop. Optional property that maps to a Menu's `menuId` prop.
Can also be `left` or `right` for the menu side. Can also be `start` or `end` for the menu side.
This is used to find the correct menu to toggle This is used to find the correct menu to toggle.
If this property is not used, `ion-menu-toggle` will toggle the
first menu that is active.
## Attributes ## Attributes
@ -29,7 +39,10 @@ This is used to find the correct menu to toggle
boolean boolean
Automatically hides the content when the corresponding menu is not active Automatically hides the content when the corresponding menu is not active.
By default, it's `true`. Change it to `false` in order to
keep `ion-menu-toggle` always visible regardless the state of the menu.
#### menu #### menu
@ -37,8 +50,11 @@ Automatically hides the content when the corresponding menu is not active
string string
Optional property that maps to a Menu's `menuId` prop. Optional property that maps to a Menu's `menuId` prop.
Can also be `left` or `right` for the menu side. Can also be `start` or `end` for the menu side.
This is used to find the correct menu to toggle This is used to find the correct menu to toggle.
If this property is not used, `ion-menu-toggle` will toggle the
first menu that is active.

View File

@ -30,6 +30,9 @@ export class PickerColumnCmp {
@Prop() col!: PickerColumn; @Prop() col!: PickerColumn;
/**
* Emitted when the selected option has changed.
*/
@Event() ionChange!: EventEmitter<void>; @Event() ionChange!: EventEmitter<void>;
componentWillLoad() { componentWillLoad() {

View File

@ -19,6 +19,13 @@ PickerColumn
## Events
#### ionChange
Emitted when the selected option has changed.
---------------------------------------------- ----------------------------------------------

View File

@ -197,16 +197,6 @@ Emitted before the picker has presented.
## Methods ## Methods
#### addButton()
Add a new PickerButton to the picker
#### addColumn()
Add a new PickerColumn to the picker
#### dismiss() #### dismiss()
Dismiss the picker overlay after it has been presented. Dismiss the picker overlay after it has been presented.
@ -217,11 +207,6 @@ Dismiss the picker overlay after it has been presented.
Returns the column the matches the specified name Returns the column the matches the specified name
#### getColumns()
Returns all the PickerColumns
#### onDidDismiss() #### onDidDismiss()
Returns a promise that resolves when the picker did dismiss. It also accepts a callback Returns a promise that resolves when the picker did dismiss. It also accepts a callback

View File

@ -102,7 +102,7 @@ Specifies the value granularity. Defaults to `1`.
#### value #### value
any number
the value of the range. the value of the range.
@ -194,7 +194,7 @@ Specifies the value granularity. Defaults to `1`.
#### value #### value
any number
the value of the range. the value of the range.