UNPKG

@etsoo/smarterp-crm

Version:

TypeScript APIs for SmartERP Customer Relationship Management (CRM)

28 lines (27 loc) 1.08 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.PersonTiplist = PersonTiplist; const jsx_runtime_1 = require("react/jsx-runtime"); const materialui_1 = require("@etsoo/materialui"); const CrmApp_1 = require("../../CrmApp"); /** * Person tiplist * 人员提示列表 * @param props Properties * @returns Component */ function PersonTiplist(props) { // CRM app const crm = (0, CrmApp_1.useRequiredCrmContext)(); // Destruct const { fullWidth = true, label = crm.app.get("user"), maxItems = 10, getOptionLabel = (data) => data.name, name = "personId", rq = { enabled: true }, ...rest } = props; // Layout return ((0, jsx_runtime_1.jsx)(materialui_1.Tiplist, { label: label, getOptionLabel: getOptionLabel, name: name, fullWidth: fullWidth, maxItems: maxItems, loadData: (keyword, id, maxItems) => crm.personApi.list({ ...rq, keyword, id, queryPaging: { batchSize: maxItems } }, { showLoading: false, defaultValue: [] }), ...rest })); }