Skip to content

Commit f99a771

Browse files
committed
[modal] show, hide, toggle, refresh is JQuery
1 parent 2cd2979 commit f99a771

File tree

4 files changed

+17
-9
lines changed

4 files changed

+17
-9
lines changed

doc/api.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -914,15 +914,19 @@
914914
},
915915
"methods": {
916916
"hide": {
917+
"type": "JQuery",
917918
"description": "Hides the modal"
918919
},
919920
"refresh": {
921+
"type": "JQuery",
920922
"description": "Refreshes centering of modal on page"
921923
},
922924
"show": {
925+
"type": "JQuery",
923926
"description": "Shows the modal"
924927
},
925928
"toggle": {
929+
"type": "JQuery",
926930
"description": "Toggles the modal"
927931
}
928932
}

lib/interface.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -751,22 +751,22 @@ export interface IModal {
751751
/**
752752
* Hides the modal
753753
*/
754-
hide()
754+
hide(): JQuery
755755

756756
/**
757757
* Refreshes centering of modal on page
758758
*/
759-
refresh()
759+
refresh(): JQuery
760760

761761
/**
762762
* Shows the modal
763763
*/
764-
show()
764+
show(): JQuery
765765

766766
/**
767767
* Toggles the modal
768768
*/
769-
toggle()
769+
toggle(): JQuery
770770
}
771771

772772
export interface INumeric {

src/components/modal/index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ import { IModal } from '../../../lib/interface'
2222
</div>`})
2323
export class Modal extends _ModalBase implements SemanticUI.Modal.Settings, IModal {
2424

25-
show() { return $(this.$el).modal('show') }
25+
show(): JQuery { return $(this.$el).modal('show') }
2626

27-
hide() { return $(this.$el).modal('hide') }
27+
hide(): JQuery { return $(this.$el).modal('hide') }
2828

29-
toggle() { return $(this.$el).modal('toggle') }
30-
31-
refresh() { return $(this.$el).modal('refresh') }
29+
toggle(): JQuery { return $(this.$el).modal('toggle') }
30+
31+
refresh(): JQuery { return $(this.$el).modal('refresh') }
3232

3333

3434
get hasActions() {

src/components/modal/schema/props.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,19 @@
44
},
55
"methods": {
66
"show": {
7+
"type": "JQuery",
78
"description": "Shows the modal"
89
},
910
"hide": {
11+
"type": "JQuery",
1012
"description": "Hides the modal"
1113
},
1214
"toggle": {
15+
"type": "JQuery",
1316
"description": "Toggles the modal"
1417
},
1518
"refresh": {
19+
"type": "JQuery",
1620
"description": "Refreshes centering of modal on page"
1721
}
1822
},

0 commit comments

Comments
 (0)