File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
packages/dropdowns/src/examples Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,12 @@ The `<Dropdown>` package does not include any filtering logic. The simplest way
22perform filtering is to control the ` inputValue ` and ` onInputValueChange ` props and
33conditionally render ` <Item> ` s as necessary.
44
5+ Due to a known issue caused by google translation extension, which replaces text node
6+ with ` <font> ` while React keeps references to the text node.
7+ Any conditionally rendered text node should be wrapped with ` <span> ` .
8+ Read the [ React issue] ( https://github.com/facebook/react/issues/11538#issuecomment-390386520 )
9+ for more information.
10+
511``` js
612const debounce = require (' lodash.debounce' );
713const options = [
@@ -67,7 +73,7 @@ function ExampleAutocomplete() {
6773
6874 return matchingOptions .map (option => (
6975 < Item key= {option} value= {option}>
70- {option}
76+ < span > {option}< / span >
7177 < / Item>
7278 ));
7379 };
@@ -91,7 +97,7 @@ function ExampleAutocomplete() {
9197 < span aria- label= " Garden emoji" role= " image" >
9298 🌱
9399 < / span>
94- {selectedItem}
100+ < span > {selectedItem}< / span >
95101 < / Autocomplete>
96102 < / Field>
97103 < Menu> {renderOptions ()}< / Menu>
You can’t perform that action at this time.
0 commit comments