UNPKG

@aplus-frontend/ui

Version:

18 lines (17 loc) 396 B
import { isNil as o, isString as a } from "lodash-unified"; import { getOptionValue as l, getOptionLabel as u } from "../../ap-field/radio/helper.mjs"; function c(t) { const e = t.emptyText || "--"; if (o(t.value)) return e; const i = t.options?.find( (r) => t.value === l(r) ); if (!i) return e; const n = u(i); return a(n) ? n : ""; } export { c as radioRenderer };