toystars / react-native-multiple-select

Simple multi-select component for react-native
MIT License
564 stars 313 forks source link

Unrecognized font family "Material Design Icons" #61

Open Eyesonly88 opened 6 years ago

Eyesonly88 commented 6 years ago

Issue summary

Breaking error happens when trying to render the MultiSelect component. image

I'm not doing anything special and I have latest react-native-vector-icons and the fonts that come with it.

My code is this:

<MultiSelect
                  items={Object.values(myDataObject)}
                  uniqueKey="uri"
                  onSelectedItemsChange={this.onSelectedItemsChange}
                  selectedItems={this.state.selectedItems}
                  searchInputPlaceholderText="Type Item Name..."
                  altFontFamily="System"
                  tagRemoveIconColor="#CCC"
                  tagBorderColor="#CCC"
                  tagTextColor="#CCC"
                  selectedItemTextColor="#CCC"
                  selectedItemIconColor="#CCC"
                  itemTextColor="#000"
                  displayKey="label"
                  searchInputStyle={{color: '#CCC'}}
                />

I tried different fonts in the altFontFamily and tried removing the option alltogether.

Library versions

react-native: 0.53.3 react-native-multiple-select: 0.4.1 react-native-vector-icons: 4.5.0

Steps to Reproduce

  1. Import MultiSelect
  2. Try to render it

Expected Behavior

I expect it to render and work as described.

(Write what you thought would happen.)

Actual Behavior

I get this error image

I tried rm -rf ios/build and rm -rf node_modules and react-native link I also cleaned the project and rebuild The error keeps happening.

Reproducible Code

My code is this:

<MultiSelect
                  items={Object.values(myDataObject)}
                  uniqueKey="id"
                  onSelectedItemsChange={this.onSelectedItemsChange}
                  selectedItems={this.state.selectedItems}
                  searchInputPlaceholderText="Type Item Name..."
                  altFontFamily="System"
                  tagRemoveIconColor="#CCC"
                  tagBorderColor="#CCC"
                  tagTextColor="#CCC"
                  selectedItemTextColor="#CCC"
                  selectedItemIconColor="#CCC"
                  itemTextColor="#000"
                  displayKey="label"
                  searchInputStyle={{color: '#CCC'}}
                />

I tried different fonts in the altFontFamily and tried removing the option alltogether.

cyclone747 commented 6 years ago

Same here also Ensure to add and configure react-native-vector-icons react-native link i did everything lastly just i shut down all the thing and start it again mine is working fine.

Eyesonly88 commented 6 years ago

@cyclone747 interesting, what React Native version are you on? FYI - I ended up building my own and using it now so don't need this library anymore.

cyclone747 commented 6 years ago
 thanks for replaying me . below is my details

"react": "16.3.0-alpha.1",
"react-native": "0.54.1",
"react-native-multiple-select": "^0.4.1",
"react-native-quick-select": "0.0.4",
"react-native-vector-icons": "^4.5.0"
JeremyBradshaw7 commented 6 years ago

Also having this problem.

manuel-delaiglesia commented 6 years ago

Same issue using the font in the example. Message is: Unrecognized font family 'ProximaNova-Light' RN 0.55.4 in OSX Sierra for iOS. Not reproduced in Windows for Android.

Montaguti commented 6 years ago

I had a similar issue. I solved updating from "react-native-vector-icons": v4.X to v5.0.0

john-diaz commented 5 years ago

No solution yet?

Ksiner commented 4 years ago

Import MaterialCommunityIcons.ttf to the project. You can find guid for importing fonts here https://github.com/oblador/react-native-vector-icons#ios and here https://github.com/oblador/react-native-vector-icons#android.