Closed fastfasterfastest closed 4 years ago
In case those knockout commits appear in a future public knockout release, I believe the following change in prepareTemplateOptions
will avoid this issue:
Change
result.name = options.template;
to
if (options.hasOwnProperty('template')) { result.name = options.template; }
or
if (options.template) { result.name = options.template; }
@fastfasterfastest - thanks for the heads up
Thanks for the heads up so long ago @fastfasterfastest. Version 1.2.0 is out with this fix.
FYI, knockout commits https://github.com/knockout/knockout/commit/0f0cb8e23fa3f01a9f845cb539f2b6521322664f and https://github.com/knockout/knockout/commit/a93358fb9e2e2ef285985df2015a442ad83fd09a which is addressing https://github.com/knockout/knockout/issues/2446 breaks the
knockout-sortable
binding when it is used with anonymous templates and the value is an object, e.g.The
knockout-sortable
binding currently passes{ name: undefined, … }
as the value to thetemplate
binding when it is used with anonymous templates and the value is an object, and the above mentioned commits (not yet in a public release of knockout) have changed how knockout handles a value that has aname
property.See https://jsfiddle.net/fastfasterfastest/3rekjytw/