How to use the @webiny/app/hooks/useAutocomplete.useAutocomplete function in @webiny/app

To help you get started, we’ve selected a few @webiny/app examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github webiny / webiny-js / packages / app-page-builder / src / admin / components / TagsMultiAutocomplete.js View on Github external
export function TagsMultiAutocomplete(props) {
    const autoComplete = useAutocomplete({
        search: query => query,
        query: SEARCH_TAGS
    });
    return (
        
    );
}
github webiny / webiny-js / packages / app-page-builder / src / admin / components / PagesAutocomplete.js View on Github external
export function PagesAutocomplete(props) {
    const autoComplete = useAutocomplete(LIST_PUBLISHED_PAGES);

    return (
        
            {({ data }) => {
                const value = get(data, "pageBuilder.page.data");
                return (
                    
                );
            }}
github webiny / webiny-js / packages / app-security / src / admin / views / Components / RolesAutocomplete.js View on Github external
export default function RolesAutocomplete(props) {
    const autoComplete = useAutocomplete({
        search: query => ({ query, fields: ["name"] }),
        query: LIST_ROLES
    });
    return ;
}
github webiny / webiny-js / packages / app-i18n / src / admin / views / I18NLocales / LocaleCodesAutoComplete.js View on Github external
const LocaleCodesAutoComplete = props => {
    const autoComplete = useAutocomplete(SEARCH_LOCALE_CODES);
    const options = [...autoComplete.options];
    if (props.value && !options.includes(props.value)) {
        options.push(props.value);
    }

    return ;
};
github webiny / webiny-js / packages / app-page-builder / src / admin / components / CategoriesAutocomplete.js View on Github external
export function CategoriesAutocomplete(props) {
    const autoComplete = useAutocomplete({
        search: query => ({ query, fields: ["name"] }),
        query: LIST_CATEGORIES
    });

    return (
        
            {({ data }) => (
                
            )}
        
    );
}
github webiny / webiny-js / packages / app-security / src / admin / views / Components / GroupsAutocomplete.js View on Github external
export default function GroupsAutocomplete(props) {
    const autoComplete = useAutocomplete({
        search: query => ({ query, fields: ["name"] }),
        query: LIST_GROUPS
    });
    return ;
}