Allow ToggleWidgetValues to accept multiple values
See original GitHub issueDo you want to request a feature or report a bug? feature
Feature: What is your use case for such a feature? I have an attribute I’d like to use a toggle widget for, but I’d like to have the “on” value be one of many options.
Feature: What is your proposed API entry? The new option to add? What is the behavior? I’d like to use it like this:
search.addWidget(instantsearch.widgets.toggle({
container: '#toggle',
attributeName: `hasMedia`,
on: [true, 'true', 1, '1'],
}));
An alternate implementation might allow you to pass a fn with an argument of the value of the specified attr, returning a bool:
search.addWidget(instantsearch.widgets.toggle({
container: '#toggle',
attributeName: `hasMedia`,
on: (value) => {
return value && value !== 'off';
},
}));
What is the version you are using? Always use the latest one before opening a bug issue. 1.11.12/2.beta-5
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:15 (10 by maintainers)
Top Results From Across the Web
Correct way to pass multiple values for same parameter name ...
I'm looking into what is the correct way to pass multiple values for the same parameter name in a GET ...
Read more >Multiple values—ArcGIS Pro | Documentation
Many geoprocessing tools have parameters that allow you to specify multiple values to be used in processing.
Read more >Allow multiple values to be selected from 1 field - ServiceNow
Solved: Hello, I have a requirement to allow users to select multiple values within 1 field. For example, the field is called Select...
Read more >Basic Question: Trying to Add Item to a "Multiple Values"
First, let me start with I have merely dabbled in simple Access databases, and am trying to stick with macros but open to...
Read more >How to create a parameter prompt that accepts multiple values ...
Normally when a Parameter Query prompts for a parameter you can enter only one value. If you have a table for all customers...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Kocal It’s available@4.6.0. https://github.com/algolia/instantsearch.js/blob/master/CHANGELOG.md#460-2020-06-08
Thank you for your contribution 😃
I’ll release this on Monday.