Skip to content

Commit 7a3ca1f

Browse files
committed
Merge pull request DefinitelyTyped#5673 from errorx666/jqueryui-buttonoptions
Update JQueryUI ButtonOptions interface
2 parents a461a24 + d03f6e2 commit 7a3ca1f

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

jqueryui/jqueryui-tests.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1438,6 +1438,7 @@ function test_dialog() {
14381438
});
14391439
$(".selector").dialog({ autoOpen: false });
14401440
$(".selector").dialog({ buttons: { Ok: function () { $(this).dialog("close"); } } });
1441+
$(".selector").dialog({ buttons: [ { text: "Ok", click: function () { $(this).dialog("close"); } } ] } );
14411442
$(".selector").dialog({ closeOnEscape: false });
14421443
$(".selector").dialog({ closeText: "hide" });
14431444
$(".selector").dialog({ dialogClass: "alert" });

jqueryui/jqueryui.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ declare module JQueryUI {
8686
disabled?: boolean;
8787
icons?: any;
8888
label?: string;
89-
text?: boolean;
89+
text?: string|boolean;
90+
click?: (event?: Event) => void;
9091
}
9192

9293
interface Button extends Widget, ButtonOptions {

0 commit comments

Comments
 (0)