downshift-js/downshift

ItemClick doesn't work with stateReducer inside an iframe

開放

#1,237 建立於 2021年2月13日

 (9 則留言) (3 個反應) (0 位負責人)JavaScript (980 個分叉)batch import
bughelp wantedneeds investigation

倉庫指標

星標
 (11,761 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

  • downshift version: 6.1.0
  • node version: codesandbox
  • npm (or yarn) version: codesandbox

What you did: I tried to combine the default example of multiple select and that state reducer part to achieve my dropdown not being closed after item click. I also wrap it in an iframe(using react-frame-component), cause I have such setup for my components in the documentation environment.

What happened:

ezgif-4-44bd487af032

ItemClick change type doesn't trigger stateReducer, which causes menu to close, although InputKeyDownEnter does.

Reproduction repository:

https://codesandbox.io/s/gallant-meadow-660h4?file=/src/index.js

Problem description: stateReducer doesn't fire with useCombobox.stateChangeTypes.ItemClick inside an iframe

Suggested solution: I could implement the fix with some advise help. Do you have any idea, what causes this?

貢獻者指南