I have an Element of EntityMultiLevelSelector when I call this tag I got an Array that displays on a dialog.
But I need to apply search on this list but I can't console any array by using this tag. If someone knows how to apply array functionality on an array kindly help me out.
Here is my code.
import { Body2, Button, Dialog, Icon, ScrollView, TextInput, View } from '@bluebase/components';
import { Entity, EntityInfoQuery, EntityInfoQueryQuery } from '@mevris/client-graphql';
import React, { useCallback, useEffect, useState } from 'react';
import { TextStyle, ViewStyle } from 'react-native';
import { Theme, useStyles, useTheme } from '@bluebase/core';
import { EntityMultiLevelSelector } from '../../../imports';
import { IRuleCondition } from '../convertConditionToList';
import { MultiLevelSelectorItem } from '@blueeast/client-plugin-ui';
import { useLazyQuery } from '@apollo/client';
export const ConditionEntityMenu = (props: ConditionEntityMenuProps) => {
return (
<View style={styles.root}>
<Button
variant="outlined"
size="small"
color={color}
loading={loading}
disabled={loading}
onPress={openMenu}
style={styles.button}
>
{data?.entity.name ?? 'Select Entity'} <Icon name="menu-down" color={color} />
</Button>
<Dialog visible={isMenuOpen} dismissable onDismiss={closeMenu}>
<View style={styles.list}>
<TextInput style={{ padding: 10 }} placeholder="Search Items"/>
<ScrollView>
<EntityMultiLevelSelector value={entityId} onChangeValue={onChangeValue as any} />
</ScrollView>
</View>
<View style={styles.footer}>
<Body2 style={styles.hint}>
{entity ? `Selected: ${entity.name}` : ''}
</Body2>
<Button title="Select" variant="outlined" disabled={!entity} onPress={onSelect} />
</View>
</Dialog>
</View>
);
}
Here is the output of my code