Skip to content

Commit

Permalink
fix(item-sliding): update open method transition
Browse files Browse the repository at this point in the history
  • Loading branch information
shreeshbhat committed Apr 6, 2019
1 parent 5444c93 commit fdfdca9
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions core/src/components/item-sliding/item-sliding.tsx
Expand Up @@ -121,13 +121,17 @@ export class ItemSliding implements ComponentInterface {
*/
@Method()
async open() {
const options = this.el.querySelector('ion-item-options');
if (options) {
options.style.display = 'flex';
const width = options.offsetWidth;
openSlidingItem = this.el;
options.style.display = '';
this.setOpenAmount(width, true);
if (!this.openAmount && !!this.item) {
const options = this.el.querySelector('ion-item-options');
if (options) {
this.item.style.transition = 'transform 500ms cubic-bezier(0.36, 0.66, 0.04, 1)';
this.item.style.webkitTransition = '-webkit-transform 500ms cubic-bezier(0.36, 0.66, 0.04, 1)';
options.style.display = 'flex';
const width = options.offsetWidth;
openSlidingItem = this.el;
options.style.display = '';
this.setOpenAmount(width, false);
}
}
}

Expand Down

0 comments on commit fdfdca9

Please sign in to comment.