mirror of
https://github.com/gradio-app/gradio.git
synced 2025-01-12 10:34:32 +08:00
radio select first
This commit is contained in:
parent
2d94ec14c5
commit
6f86ade887
@ -11,15 +11,15 @@ const radio = {
|
||||
}
|
||||
html += "</div>"
|
||||
this.target.html(html);
|
||||
this.target.find("input:first-child").prop("checked", true);
|
||||
},
|
||||
submit: function() {
|
||||
checked_val = this.target.find("input:checked").val();
|
||||
if (checked_val) {
|
||||
this.io_master.input(this.id, this.choices[checked_val]);
|
||||
}
|
||||
this.io_master.input(this.id, this.choices[checked_val]);
|
||||
},
|
||||
clear: function() {
|
||||
this.target.find("input").prop("checked", false);
|
||||
this.target.find("input:first-child").prop("checked", true);
|
||||
},
|
||||
load_example: function(data) {
|
||||
let child = this.choices.indexOf(data) + 1;
|
||||
|
Loading…
Reference in New Issue
Block a user