From e142bce0a04485961c9e76fd5174da5a3346f415 Mon Sep 17 00:00:00 2001 From: Xoce51 Date: Thu, 8 Mar 2018 17:47:38 +0100 Subject: [PATCH] Update documentation to match with the select search method #9494 (#9577) --- components/cascader/demo/search.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/components/cascader/demo/search.md b/components/cascader/demo/search.md index 3d77c51989..a0340b2862 100644 --- a/components/cascader/demo/search.md +++ b/components/cascader/demo/search.md @@ -52,12 +52,16 @@ function onChange(value, selectedOptions) { console.log(value, selectedOptions); } +function filter(inputValue, path) { + return (path.some(option => (option.label).toLowerCase().indexOf(inputValue.toLowerCase()) > -1)); +} + ReactDOM.render( , mountNode );