Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InfoWindow 点击事件无效 ? #86

Closed
lijinke666 opened this issue Jan 23, 2019 · 4 comments
Closed

InfoWindow 点击事件无效 ? #86

lijinke666 opened this issue Jan 23, 2019 · 4 comments
Labels
type: bug Something isn't working

Comments

@lijinke666
Copy link

Do you want to request a feature or report a bug?

bug

What is the current behavior?

    <InfoWindow
                visible={cityInfoPanelVisible}
                displayMessage
                width={200}
                height={100}
              >
                <Point lng={currentLocationLng} lat={currentLocationLat} />
                <Title>海底捞王府井店</Title>
                <Content>
                  <div className="reservation-map-address">
                    地址:北京市东城区王府井大街88号乐天银泰百货八层
                  </div>
                  <div
                    onClick={this.onSelectStore}
                    className="reservation-map-select-store"
                  >
                    点击
                  </div>
                  <Events click={this.onSelectStore} />
                </Content>
                <Events close={this.onCloseCityInfoPanel} />
                <Size name="offset" width="0" height="-30" />
              </InfoWindow>

点击 <Content> 中 的 点击 按钮时 无法触发点击事件

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run. Paste the link to your CodeSandbox (https://codesandbox.io/s/jnnxrwq5y3) example below:

What is the expected behavior?

@JserWang
Copy link
Owner

Content无点击事件,如果你想监听整个InfoWIndow的点击事件,可以使用

<InfoWindow>
   <Events close={...} click={...} />
</InfowWindow>

@lijinke666
Copy link
Author

你好 感谢回复, 我的意思是 我想给 <Content> 里面的 div 绑定一个 点击事件

<Content>
      {...}
      <div onClick={...}>1</div> 
</Content>

@JserWang JserWang added the type: bug Something isn't working label Jan 23, 2019
@JserWang
Copy link
Owner

你好,经查看,这是一个BUG,会在1.0.2版本中修复。

@lijinke666
Copy link
Author

好的 感谢, 不过已经用原生写完了 哈哈 😁

JserWang added a commit that referenced this issue Feb 11, 2019
JserWang added a commit that referenced this issue Feb 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants