Gravatar for mark.angus@sitesystems.ca

Question by mark, Feb 10, 2015 11:46 AM

Facet no longer respects the numberOfValues option after setting allowedValues.

Hi, I am using the jsframeworks. I am using the search init to set custom facet options. The facet respects the numberOfValues setting until I set the allowedValues option.

I have the numberOfValues set to 10 but my allowedValues length is about 80. How would I go about setting this up so that the more/Fewer links are available.

Thanks.

1 Reply
Gravatar for slangevin@coveo.com

Answer by Simon, Feb 16, 2015 11:55 AM

Hi, I am not sure if I see a link between the numberOfValues and the allowedValues. Allowed values is an array of file type, so you mean that your Array length is 80?

The enableMoreLess parameter is the one that controls the More/Fewer button on the Facet, and the numberOfValues is the maximum amount before these buttons appear.

Am I missing something?

Cheers,
Simon

Gravatar for mark.angus@sitesystems.ca

Comment by mark, Feb 17, 2015 9:35 AM

Hi, right so if I set the allowedValues to an array of 80 and the numberOfValues to 10, it should show in increments of 10 until I reach the 80, but instead its showing the full 80.

Gravatar for slangevin@coveo.com

Comment by Simon, Feb 19, 2015 5:41 PM

Indeed but I do not think this is related to the allowedValue. The numberOfValue is the initial maximum. Clicking on more will simply show the whole list. There are no increment, only two states, collapsed or expended.

Gravatar for jpdery@coveo.com

Comment by jpdery, Jun 12, 2015 9:10 AM

Any solution to this? I face same issue: numberOfValue =5, allowedvalues = [a,b,c,d,e,f,g,h,i,j,k] …problem not realyl that i see the showmore/less, is that my facet does NOT show only 5 items initially.

Ask a question