@sheerid/jslib-nightly
Version:
SheerID JavaScript Library
51 lines (50 loc) • 2.01 kB
TypeScript
import { default as React } from 'react';
import { OrganizationSearchResp, PropertiesOf, DatabaseId, Locale } from '../lib/types/types';
interface FetchOrganizationsProps {
getItemProps: any;
highlightedIndex: any;
itemToString: any;
minimumSearchValueLength: number;
onLoaded: any;
programId: DatabaseId;
orgSearchUrl?: string;
locale?: Locale;
urlAddSchoolForm?: string;
openOrgSearchEnabled?: boolean;
onClickAddSchool?: () => void;
searchUrlParams?: Record<string, string>;
/** @deprecated */
countryCode?: string;
/** @deprecated orgSearchTags has no affect, pass a full orgSearchUrl, instead */
orgSearchTags?: string;
/** @deprecated pass a complete orgSearchUrl instead, using the `name` parameter with a value of what you would have given `searchValue` */
searchValue?: string;
/** @deprecated. Menu is always mounted now, up in TypeaheadComponent. */
getMenuProps?: any;
}
interface FetchOrganizationState {
isErrored: string;
loading: boolean;
organizations: OrganizationSearchResp;
}
export declare const getAttribution: (organizations: OrganizationSearchResp) => React.ReactNode;
/**
* Support deprecated prop "searchValue"
* @TODO remove searchValue prop and this function in v2
* @param orgSearchUrl
*/
export declare const updateSearchUrl: (orgSearchUrl: string, searchValue: string, newParams?: Record<string, string>) => string;
declare class FetchOrganizations extends React.Component<FetchOrganizationsProps, FetchOrganizationState> {
static initialState: FetchOrganizationState;
mounted: boolean;
constructor(props: any);
fetch: () => Promise<void>;
reset(overrides: PropertiesOf<FetchOrganizationState>): void;
debouncedFetch: any;
componentDidMount(): void;
componentDidUpdate(prevProps: any): void;
componentWillUnmount(): void;
render(): React.JSX.Element;
}
export declare const FetchOrganizationsComponent: typeof FetchOrganizations;
export {};