From 13444bdd8c5d5886ca53dcd3cee49ce8330cbec4 Mon Sep 17 00:00:00 2001 From: Domenico Matteo Date: Tue, 27 Dec 2016 16:41:18 -0500 Subject: [PATCH] Document the undocumented `ignoreAccents` property --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 34c096ca2b..f56b25d01a 100644 --- a/README.md +++ b/README.md @@ -250,16 +250,18 @@ You can control how options are filtered with the following properties: * `matchPos`: `"start"` or `"any"`: whether to match the text entered at the start or any position in the option value * `matchProp`: `"label"`, `"value"` or `"any"`: whether to match the value, label or both values of each option when filtering * `ignoreCase`: `Boolean`: whether to ignore case or match the text exactly when filtering +* `ignoreAccents`: `Boolean`: whether to ignore accents on characters like ø or å `matchProp` and `matchPos` both default to `"any"`. `ignoreCase` defaults to `true`. +`ignoreAccents` defaults to `true`. #### Advanced filters You can also completely replace the method used to filter either a single option, or the entire options array (allowing custom sort mechanisms, etc.) -* `filterOption`: `function(Object option, String filter)` returns `Boolean`. Will override `matchPos`, `matchProp` and `ignoreCase` options. -* `filterOptions`: `function(Array options, String filter, Array currentValues)` returns `Array filteredOptions`. Will override `filterOption`, `matchPos`, `matchProp` and `ignoreCase` options. +* `filterOption`: `function(Object option, String filter)` returns `Boolean`. Will override `matchPos`, `matchProp`, `ignoreCase` and `ignoreAccents` options. +* `filterOptions`: `function(Array options, String filter, Array currentValues)` returns `Array filteredOptions`. Will override `filterOption`, `matchPos`, `matchProp`, `ignoreCase` and `ignoreAccents` options. For multi-select inputs, when providing a custom `filterOptions` method, remember to exclude current values from the returned array of options. @@ -357,6 +359,7 @@ function onInputKeyDown(event) { disabled | bool | false | whether the Select is disabled or not filterOption | func | undefined | method to filter a single option: `function(option, filterString)` filterOptions | func | undefined | method to filter the options array: `function([options], filterString, [values])` + ignoreAccents | bool | true | whether to strip accents when filtering ignoreCase | bool | true | whether to perform case-insensitive filtering inputProps | object | {} | custom attributes for the Input (in the Select-control) e.g: `{'data-foo': 'bar'}` isLoading | bool | false | whether the Select is loading externally or not (such as options being loaded)