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

使用 Codemirror 的 pin.textarea 在使用 pin["xxx"] = xxx 更新内容时会触发 pin_on_change #459

Closed
18870 opened this issue Aug 22, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@18870
Copy link

18870 commented Aug 22, 2022

BUG描述
rt

复现代码

from pywebio.output import *
from pywebio.pin import *

def setpin(name, value):
    pin[name] = value

def main():
    put_textarea("a1", value="123456789", label="standard")
    put_textarea("a2", value="123456789", label="codemirror", code={"lineWrapping": True, "lineNumbers": False})

    pin_on_change("a1", lambda value: put_text("a1 changed to {}".format(value)))
    pin_on_change("a2", lambda value: put_text("a2 changed to {}".format(value)))

    put_button("set a1", lambda: setpin("a1", "987654321"))
    put_button("set a2", lambda: setpin("a2", "987654321"))


start_server(main, port=80)

Animation

环境信息

  • Python版本: 3.7.8
  • PyWebIO版本: 1.6.2
@18870 18870 added the bug Something isn't working label Aug 22, 2022
@wang0618
Copy link
Member

感谢反馈,已经在最新提交中修复,可以安装dev版本使用

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants