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

API proposal: currentRefinedValues widget #404

Closed
Jerska opened this issue Nov 2, 2015 · 4 comments
Closed

API proposal: currentRefinedValues widget #404

Jerska opened this issue Nov 2, 2015 · 4 comments
Assignees
Milestone

Comments

@Jerska
Copy link
Member

Jerska commented Nov 2, 2015

Follow up of #112 and #378:

search.addWidget(
  instantsearch.widgets.currentRefinedValues({
    container: '#current-refinements-list',
    cssClasses: {root, header, body, clearAll, list, item, link, count, footer},
    attributes: [ // Optional, if not specified, takes all of the facets
      { name: 'category'[, transformData: function (data) { /* ... */ return data; }]},
      { name: 'brand'[, transformData: function (data) { /* ... */ return data; }]}
    ],
    templates: {
      header: '',
      item: '' + // Called with this.facets[current_facet.name].transformData({cssClasses, facetName, name, count})
        '{{ name }}' +
        '<span class="{{ cssClasses.count }}">' +
        '  {{ count }}' +
        '</span>',
      clearAll: 'Clear all'
      footer: ''
    },
    clearAll: 'after', // [true, false, 'before', 'after'] (true == 'before')
    hideContainerWhenNoRefinements: true
  })
);
@Jerska Jerska added this to the 1.0.0 milestone Nov 2, 2015
@Jerska Jerska self-assigned this Nov 2, 2015
@Jerska Jerska changed the title API proposal: currentRefinementList widget API proposal: currentRefinedValues widget Nov 3, 2015
@Jerska
Copy link
Member Author

Jerska commented Nov 13, 2015

I've changed facets with attributes since it should also handle _tags.

@vvo vvo modified the milestones: next, 1.0.0 Nov 17, 2015
@vvo
Copy link
Contributor

vvo commented Nov 17, 2015

Moving to "next" (1.1.0)

@redox
Copy link
Contributor

redox commented Jan 5, 2016

@jerskouille that's done, right?

@Jerska
Copy link
Member Author

Jerska commented Jan 5, 2016

Oh yes, merged in #700 .

@Jerska Jerska closed this as completed Jan 5, 2016
@Jerska Jerska removed the in progress label Jan 5, 2016
vvo pushed a commit that referenced this issue Feb 2, 2016
<a name="1.2.0"></a>
# [1.2.0](v1.1.3...v1.2.0) (2016-02-02)

### Bug Fixes

* **all:** typos ([fa8ba09](fa8ba09))
* **currentRefinedValues:** allow array of strings for cssClasses.* ([55b3a3f](55b3a3f))
* **docs:** fixed bad link to scss in custom themes section ([823a859](823a859))
* **getRefinements:** a name should be a string ([7efd1fd](7efd1fd))
* **getRefinements:** hierarchical facets ([fe0fc5d](fe0fc5d))
* **index:** Use module.exports instead of export on index ([81e7eee](81e7eee))
* **pagination:** remove default value of maxPages. Fixes #761 ([607fe9a](607fe9a)), closes [#761](#761)
* **prepareTemplates:** uses templates with keys that are not in defaults ([c4bf8ec](c4bf8ec))
* **rangeSlider:**     prevent slider from extending farther than the last pip ([6e534f5](6e534f5))
* **search-box:** update value when state changes from the outside ([4550f99](4550f99))
* **url-sync:** adds indexName in the helper configuration ([e50bafd](e50bafd))
* **url-sync:** Makes url sync more reliable ([3157abc](3157abc)), closes [#730](#730) [#729](#729)

### Features

* **currentRefinedValues:** new widget ([6c926d0](6c926d0)), closes [#404](#404)
* **hits:** adds allItems template as an alternative to item ([1f3f889](1f3f889))
* **poweredBy:** automatically add utm link to poweredBy ([05d1425](05d1425)), closes [#711](#711)
* **priceRanges:** add currency option ([f41484a](f41484a))
* **refinementlist:** lets configure showmore feature ([3b8688a](3b8688a))
* **Template:** accepts any parameters and forwards them ([5170f53](5170f53))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants