Skip to content

Version 3.1.0

Compare
Choose a tag to compare
@SteveSanderson SteveSanderson released this 04 Mar 21:01
· 653 commits to master since this release

This release focuses mainly on performance and stability/compatibility improvements, plus small enhancements to existing functionality (yes, we're saving the big new features for v3.2). So, in 3.1:

New features

  • #1190 - new rate limiting functionality to have better control and flexibility over throttle/debounce scenarios
  • #1003 - renderTemplate now supports the name argument being observable.
  • #647 - add valueAllowUnset option that allows the value binding to accept a selected value that is not currently in the list of options
  • #627 - provide access to dependency count and whether it is the first evaluation within a computed
  • #1151 - provide item index to array util method callbacks
  • #1272 - deferred computeds will now be evaluated on a manual subscription, if not previously evaluated
  • #865 - ko.utils.domNodeDisposal.cleanExternalData extensibility point can be overriden (perhaps to prevent jQuery.cleanData from being called in some scenarios)

Perf improvements

  • #775 - in browsers that support setting proto, set subscribable/observable/computed/observableArray prototype rather than copy methods from "fn" objects.
  • #1221 - use objects instead of arrays to track computed dependencies (can be major perf boost in older IE when there are lots of dependencies on a single computed/observable).
  • #1199 - various performance optimizations related to array operations

Bugs fixed

  • #844 - prevent older IE errors with options binding used in separate document
  • #1081 - prevent option placeholder from being re-added in update
  • #1191 - remove jQuery workaround related to checked binding when using newer jQuery versions.
  • #1193 - look for jQuery instance in ko.applyBindings, if it was not available when KO was loaded. This helps to prevent issues with KO not taking advantage of jQuery, if it was not loaded before KO.
  • #1206 - for observable view models, $rawData should be the observable
  • #1207 - "arrayChange" tracking no longer assumes all items added are new on a splice
  • #1208 - older IE issue with options binding related to optionsCaption being removed on each update
  • #1209 - prevent a deferred computed that is disposed before evaluation from taking dependencies when evaluated
  • #1214 - prevent errors when using the value binding with jQuery templates
  • #1255 - track observables accessed in getBindingAccessors - helps backwards compatibility with custom binding providers
  • #1289 - prevent adding a disposal callback when disposeWhenNodeIsRemoved value is not a node
  • #1306 - value binding - fix issue related to autocomplete tracking always firing update in browsers that don't fire change event on autocomplete