mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-06 07:47:04 +00:00
Merge pull request #32755 from SPWizard01/master
[isotope-layout] filtering function passes an argument of an item being filtered
This commit is contained in:
Vendored
+2
-1
@@ -2,6 +2,7 @@
|
||||
// Project: http://isotope.metafizzy.co/
|
||||
// Definitions by: Anže Videnič <https://github.com/avidenic>
|
||||
// Mălin Brândușe <https://github.com/malinushj>
|
||||
// SPWizard01 <https://github.com/SPWizard01>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
@@ -30,7 +31,7 @@ declare namespace Isotope {
|
||||
* If set to a string, that value is used as a selector.
|
||||
* If filter is set to a function, that function checks each item and returns true or false if the item should be shown or hidden.
|
||||
*/
|
||||
filter?: string | (() => boolean);
|
||||
filter?: string | ((itemElement: HTMLElement) => boolean);
|
||||
/**
|
||||
* Items are arranged into rows. Rows progress vertically. Similar to what you would expect from a layout that uses CSS floats. fitRows works well for items that have the same height.
|
||||
*/
|
||||
|
||||
@@ -70,8 +70,8 @@ let $grid = $('.grid').isotope({
|
||||
|
||||
// test the ones not used in upper test
|
||||
$grid = $('.grid').isotope({
|
||||
filter: (): boolean => {
|
||||
return true;
|
||||
filter: (itemElem): boolean => {
|
||||
return itemElem ? true : false;
|
||||
},
|
||||
sortAscending: {
|
||||
key: true
|
||||
|
||||
Reference in New Issue
Block a user