palantir/blueprint

ItemPredicate make onActiveItemChange fired twice and active item isn't the good one

Open

#4,192 创建于 2020年6月25日

在 GitHub 查看
 (4 评论) (5 反应) (0 负责人)TypeScript (20,263 star) (2,167 fork)batch import
P2Package: selectType: bughelp wanted

描述

Environment

  • Package version(s): 3.28.1
  • Operating System: Mac OS - latest
  • Browser name and version: chrome Version 83.0.4103.106 (Build officiel) (64 bits)

Steps to reproduce

  1. Define a Select component with a custom item list render and item render
  2. Add itemPredicate function
  3. select an item
  4. Open the Select back ( active item isn't item selected )

Actual behavior

I don't know why but onActiveItemChange is fired twice when a itemPredicate is defined. First you get the selected item and just after onActiveItemChange is fired with the first item in the list with no reason.

Expected behavior

ActiveItem is the selected item when you open the list after a select.

贡献者指南

ItemPredicate make onActiveItemChange fired twice and active item isn't the good one · palantir/blueprint#4192 | Good First Issue