feat(slides): expose updateAutoHeight (#17208)

fixes #15079
This commit is contained in:
Manu MA
2019-01-22 16:00:25 +01:00
committed by GitHub
parent a945b03144
commit 835aea9c4a
6 changed files with 32 additions and 2 deletions

View File

@ -294,6 +294,22 @@ Type: `Promise<void>`
### `updateAutoHeight(speed?: number | undefined) => Promise<void>`
Force swiper to update its height (when autoHeight enabled) for the duration equal to 'speed' parameter
#### Parameters
| Name | Type | Description |
| ------- | --------------------- | ----------- |
| `speed` | `number \| undefined` | |
#### Returns
Type: `Promise<void>`
## CSS Custom Properties

View File

@ -161,6 +161,15 @@ export class Slides implements ComponentInterface {
swiper.update();
}
/**
* Force swiper to update its height (when autoHeight enabled) for the duration equal to 'speed' parameter
*/
@Method()
async updateAutoHeight(speed?: number) {
const swiper = await this.getSwiper();
swiper.updateAutoHeight(speed);
}
/**
* Transition to the specified slide.
*/