gvas / knockout-jqueryui

Knockout bindings for the jQuery UI widgets.
http://gvas.github.com/knockout-jqueryui/
MIT License
103 stars 38 forks source link

Unable to set default properties for widget bindings #29

Open sammuell opened 10 years ago

sammuell commented 10 years ago

Afaik it's not possible to set default properties for a widget binding. It's possible to set custom default values for all widget instances, but not for just those created by the ko bindings:

$.extend($.ui.dialog.prototype.options, {
  autoOpen: false,
  width: 600,
  modal: true,
  draggable: true,
  resizable: false,
  show: { effect: "fade", duration: 100 }
});

It would be handy to have access to the widgetOptions inside the preInitHandlers.