File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change 1
- import { Component , Prop } from '@stencil/core' ;
1
+ import { Component , Element , Method , Prop } from '@stencil/core' ;
2
2
3
3
import { Mode } from '../../interface' ;
4
4
import { createThemedClasses } from '../../utils/theme' ;
@@ -11,7 +11,14 @@ import { createThemedClasses } from '../../utils/theme';
11
11
}
12
12
} )
13
13
export class List {
14
- mode ! : Mode ;
14
+
15
+ @Element ( ) el ! : HTMLElement ;
16
+
17
+ /**
18
+ * The mode determines which platform styles to use.
19
+ * Possible values are: `"ios"` or `"md"`.
20
+ */
21
+ @Prop ( ) mode ! : Mode ;
15
22
16
23
/**
17
24
* How the bottom border should be displayed on all items.
@@ -24,6 +31,15 @@ export class List {
24
31
*/
25
32
@Prop ( ) inset = false ;
26
33
34
+ @Method ( )
35
+ async closeSlidingItems ( ) : Promise < boolean > {
36
+ const item = this . el . querySelector ( 'ion-item-sliding' ) ;
37
+ if ( item && item . closeOpened ) {
38
+ return item . closeOpened ( ) ;
39
+ }
40
+ return false ;
41
+ }
42
+
27
43
hostData ( ) {
28
44
return {
29
45
class : {
You can’t perform that action at this time.
0 commit comments