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

Prevent updates for all user input #2377

Closed
SethTurin opened this Issue Jun 6, 2017 · 3 comments

Comments

Projects
None yet
3 participants
@SethTurin

SethTurin commented Jun 6, 2017

Is there a way to prevent updates for all user input? I'm using riot in a complex editable div, and the updates reset user text with every key and every mouse button. Currently, all my components end up needing something like this:

    keydown="{preventUpdates}"
    keyup="{preventUpdates}"
    keypress="{preventUpdates}"
    mousedown="{preventUpdates}"
    click="{preventUpdates}"

which get's really ugly. I do all my updates at specific points in the code anyway, so it would be a lot easier for me to just turn off all updates triggered by user input. Is there a way to do this?

@wintercounter

This comment has been minimized.

Show comment
Hide comment
@wintercounter

wintercounter Jun 7, 2017

You can use a mixin which does this for you. Also you can have a global mixin so it get's applied to all tags, but I wouldn't recommend that.

You can use a mixin which does this for you. Also you can have a global mixin so it get's applied to all tags, but I wouldn't recommend that.

@GianlucaGuarini

This comment has been minimized.

Show comment
Hide comment
@GianlucaGuarini

GianlucaGuarini Jun 7, 2017

Member

I think this could be a feature request rather easy to implement. I will work on it

Member

GianlucaGuarini commented Jun 7, 2017

I think this could be a feature request rather easy to implement. I will work on it

GianlucaGuarini added a commit that referenced this issue Jun 7, 2017

@SethTurin

This comment has been minimized.

Show comment
Hide comment
@SethTurin

SethTurin Jun 7, 2017

wow, that's awesome, thanks. so in the next release, do I just pass in autoUpdate: false to the compiler settings?

wow, that's awesome, thanks. so in the next release, do I just pass in autoUpdate: false to the compiler settings?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment