如何防止 InstantSearch 被切断? Algolia,React Native

问题描述

Image of issue

希望图片能很好地说明问题!我正在尝试使用 InstantSearch(由 Algolia 提供支持),并且我正在使用 react-native-swipe-list-view 进行滑动删除功能的权利。抱歉,颜色古怪,只需要弄清楚哪些组件占用了空间。我一直在疯狂地设置溢出:“可见”,并且我还调整了海拔和 zIndex 无济于事。文本建议仍然被切断。

这是一些代码

ingredientDetailContainer.js:

const IngredientDetailContainer = (props) => {

const [name,setName] = useState('');
const [objectId,setobjectId] = useState('');

return (

    <View style={{ elevation:0,zIndex:0,flex: 1.5,flexDirection: 'row',width: '100%',justifyContent: 'center',backgroundColor: 'red',overflow:'hidden' }}>
        <DragIcon />
        <View style={[{ flex: 0.05}]} />
        { Platform.OS === "ios" ?
            (
                <InstantSearch searchClient={searchClient} indexName={ALGOLIA_INDEX_NAME}>
                    <Autofill setName={setName} setobjectId={setobjectId} defaultQuery={''} editing={false} />
                </InstantSearch>
            )
            : (
                <View style={[styles.input,{  backgroundColor:'green',overflow:'visible',marginTop:'10%',flex: 0.9,fontSize: 13,color: 'gray',fontWeight: 'bold',textAlign: 'center',borderWidth: 2,borderRadius: 20,borderColor: '#D0DBEA',overflow: 'visible',borderStyle: 'solid' }]}>
                    <InstantSearch style={[{overflow:'visible',elevation:5,position:'absolute'}]} searchClient={searchClient} indexName={ALGOLIA_INDEX_NAME}>
                        <View style={[styles.autocompleteContainer,{backgroundColor:'orange',marginTop:'-20%',position:'absolute',elevation:15,zIndex: 15}]}>
                            <Autofill style={[{backgroundColor:'black',position:'absolute'}]} setName={setName} setobjectId={setobjectId} defaultQuery={''} editing={false} />
                        </View>
                    </InstantSearch>
                </View>
            )
        } 
...

recipeCreation2.js:

  const renderItem = data => (
    <IngredientDetailContainer style={[{overflow:'visible'}]} unitOnPress={TriggerModal} />
  );

...

  var IngredientList = (props) => (
    <SwipeListView
    data={listData}
    renderItem={renderItem}
    renderHiddenItem={renderHiddenItem}
    previewOpenValue={-40}
    previewOpenDelay={3000}
    leftOpenValue={75}
    onRowDidOpen={onRowDidOpen}
  />

任何有关如何解决此问题的想法将不胜感激!

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...