question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

set default filter

See original GitHub issue

Hi again, your docs say “Full support of Isotope options via options parameters” but setting a default filter doesn’t work.

isotopeOptions: {
  itemSelector: '.oc-product',
  filter: 'filter1', // what must be entered here? css class? or same as in getFilterData?
  getFilterData: {
    "show all": function() {
      return true
    },
    filter1: function(el) {
      return el.type === 'filter1'
    }
  }
}

Is this possible? If so, how?

Thank you!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
David-Desmaisonscommented, May 24, 2017

In version 3.1.0, it is possible to set default filter using filter parameter:

isotopeOptions: {
  filter: 'filter1', // reference a getFilterData parameter
  getFilterData: {
    "show all": function() {
      return true
    },
    filter1: function(el) {
      return el.type === 'filter1'
    }
  }
}

As you see, this is “full support” of isotope options 😉

0reactions
hctpblcommented, Jul 6, 2017

I tried to test it but I get an error when the component is initialized:

Cannot read property 'getFilterData' of undefined

So it seems that the _isotopeOptions variable is undefined. Weird thing is, if I change the package.json to use the non minified version of the component (src/vue_isotope.js), this works great. I don’t see the 3.1.0 release here in gitHub either. Could it be a problem with the published dist code?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to dynamically set default values for quick filters
So, the final trick to dynamically set and change the quick filter value is to use the action filter as a quick filter...
Read more >
Create a default filter for list selector records
You can set a default filter to restrict which related records users can select when editing a reference field. Default filters are simple ......
Read more >
Setting the Default Filter Setting
The default filter setting is applied automatically when you access Asset Answers. If you do not have a default setting defined, in the...
Read more >
Setup Default Filters
These filters will apply to every new title that you watch. This means if you set your Default Filters, watch a movie, and...
Read more >
How to set (or change) a default filter on a dashboard
Then click the 'settings' tab at the top right side of your screen. Click 'Default saved filter' and select the filter of choice....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found