跳到主要内容

SearchState

type SearchState = "idle" | "loading" | "success" | "empty" | "error";

Defined in: packages/rxdb-plugin-search/src/types.ts:53

SearchHandle 状态机五态。

  • idle 空查询(含 trim/转义后为空)
  • loading 防抖中等待首次结果 / 静默重查 / retry()
  • success 有结果
  • empty 查询完成但无结果
  • error 执行失败,保留最后一次查询词与结果

恢复成功的反馈通过框架绑定的 aria-live / toast 等呈现,不引入第六种状态