palantir/blueprint

v3.18.1 Select never looks for itemPredicate exactMatch on paste

Open

#5,078 opened on 2021年12月21日

GitHub で見る
 (1 comment) (0 reactions) (0 assignees)TypeScript (20,263 stars) (2,167 forks)batch import
P2Package: selectType: bughelp wanted

説明

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.

コントリビューターガイド

v3.18.1 Select never looks for itemPredicate exactMatch on paste · palantir/blueprint#5078 | Good First Issue