跳到主要内容

findOptionLabel()

function findOptionLabel(
options,
selected,
placeholder
): string;

Defined in: packages/rxdb-model/dist/query-builder/utils/popover-position.d.ts:32

在弹出层选项列表中查找匹配项的 label。

Parameters​

ParameterTypeDescription
optionsreadonly object[]选项列表(value 为选中值、label 为显示文本)
selectedstring当前选中的 value
placeholderstring未找到匹配项时返回的占位文本

Returns​

string

匹配项的 label;未找到时返回 placeholder