import * as React from "react"; import * as PropTypes from "prop-types"; import { FieldProps } from "../../types"; /** * Watches a specified field which contains taxon set IDs. * * When taxon set IDs are added, it fetches the taxa in those sets from the API and adds them to the units in formData. * * When taxon set IDs are removed, it removes any taxa belonging to those sets from the units in formData. * * uiSchema = { * "ui:field": "TaxonSetPopulatorField", * "ui:options": { * "props": { * "from": "taxonCensus", // Source object containing taxon set IDs * "fromArrayKey": "censusTaxonSetID", // Field within source object containing the taxon set IDs * "joinArray": true, // Join array of IDs into comma-separated string * } * } * } */ export default class TaxonSetPopulatorField extends React.Component { static propTypes: { uiSchema: PropTypes.Validator; fromArrayKey: PropTypes.Requireable; joinArray: PropTypes.Requireable; }> | (PropTypes.InferProps<{ from: PropTypes.Validator; fromArrayKey: PropTypes.Requireable; joinArray: PropTypes.Requireable; }> | null | undefined)[] | null | undefined>>; }>>; uiSchema: PropTypes.Requireable; }>>>; schema: PropTypes.Validator; }>>>; formData: PropTypes.Validator; }; static getName(): string; selectedTaxonSets: string[]; unitTaxonSets: Record; getStateFromProps(): { onChange: (formData: any) => Promise; }; componentDidMount(): Promise; onChange: (formData: any) => Promise; private sortByTaxonSet; private fetchTaxaFromSet; }