list.js icon indicating copy to clipboard operation
list.js copied to clipboard

Typo in docs on http://jonnystromberg.com/

Open mason-stewart opened this issue 13 years ago • 2 comments

I wasn't quite sure where to file this issue, and would be happy to submit a PR if there's a place to do so (though it looks like this was just a private blog post), but there is an error in the second example at http://jonnystromberg.com/listjs-fuzzy-search-plugin/

The ternary operator at https://github.com/javve/list/blob/master/plugins/fuzzy/list.fuzzySearch.js#L152 ends up returning an object literal if columns === undefined. The rest of the search logic expects columns to be an object, regardless of whether or not you specified a value for columns or not.

However, in the example at http://jonnystromberg.com/ , the columns argument is an array listObj.fuzzySearch('my search', [ 'name' ]); which simply doesn't work.

The example on the site for searching within a column should simply read listObj.fuzzySearch('my search', {name: true} ]);

Thanks!

mason-stewart avatar Feb 16 '13 18:02 mason-stewart

Ouch, good catch @masondesu ! I'll update that as soon as possible.

javve avatar Feb 19 '13 20:02 javve

Updated!

javve avatar Mar 15 '13 12:03 javve