palantir/blueprint

v3.18.1 Select never looks for itemPredicate exactMatch on paste

開放

#5,078 建立於 2021年12月21日

 (1 則留言) (0 個反應) (0 位負責人)TypeScript (2,167 個分叉)batch import
P2Package: selectType: bughelp wanted

倉庫指標

星標
 (20,263 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

Environment

  • Package version(s): 3.18.1
  • Operating System: macOS Big Sur 11.6
  • Browser name and version: Jest/jsdom?

Code Sandbox

Link to a minimal repro (fork this code sandbox): https://codesandbox.io/s/blueprint-sandbox-forked-mvldg?file=/src/SelectExample.tsx

Steps to reproduce

  1. Open select example.
  2. Paste "First" into the input.
  3. See how the alert is never triggered

Actual behavior

exactMatch is never set on the predicate, even though you paste the exact test or key.

Expected behavior

Pasting into the input should run the ItemPredicate with exactMatch of true to find the item with exact value. image

Possible solution

It doesn't seem like Select is spreading handlePaste into the renderer, so the renderer never handles paste events.

貢獻者指南