Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

help for contributing #123

Open
xileftenurb opened this issue Aug 12, 2019 · 3 comments
Open

help for contributing #123

xileftenurb opened this issue Aug 12, 2019 · 3 comments

Comments

@xileftenurb
Copy link

Hi,

I started to read the code so I can contribute,

I want to work on adding pagination for the project, but there is some part of the code I don't understand.
could you help me understand?

in FilterItems.ts, was is the difference between "getFiltered" and "getFilteredOut"?

and in Filterizr, why is there a "require" among the "import"? (require('imagesloaded')) how can this work in browser?

@xileftenurb
Copy link
Author

note : the bug label was automatically added because there is only a single template to choose to create issue, not because this is a bug.

@giotiskl giotiskl added help wanted and removed bug labels Aug 13, 2019
@giotiskl
Copy link
Owner

@xileftenurb fixed the bug label, good catch with the templates, I'll add a couple more for different use cases.

In FilterItems.ts, getFiltered returns the items that should be visible in the screen with the currently active filter applied (e.g. if the user has activated a filter for a category named "fruit", then all items in the grid that belong to the "fruit" category will be returned from getFiltered). The getFilteredOut function, does the exact opposite. It returns every item that does NOT belong to the "fruit" category which should be hidden.

These methods are used by the render method in the Filterizr class (in Filterizr.ts) to handle rendering the grid (and they probably need better names seeing the confusion).


As to why there is a require among the import statement.. it has to do unfortunately with the imagesLoaded package not supporting es6 module imports/exports... why it works is that at the end of the day webpack takes care of transforming everything to UMD compatible modules (check the webpack config).

@G0715
Copy link

G0715 commented Nov 11, 2019

Why can't filterizr run in Select

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants