Skip to content
This repository was archived by the owner on Nov 27, 2020. It is now read-only.
This repository was archived by the owner on Nov 27, 2020. It is now read-only.

Should onToggle get called when receiving new on prop in controlled mode? #26

@Andarist

Description

@Andarist

Im wondering if this is a correct behaviour - if we take DOM element such as input as an example the onChange wont be called in this case.

I realize that this might be purely because onChange is assiociated with DOM event which is not fired in that case, but maybe this (and other similar components) shouldnt fire their onChangedValue~ handlers in case of "programmatic change". WDYT?

This is more of a general question rather than about this lib, but answer for that question affects expected behaviour of this one, so I thought it's a good place to discuss this.

The funny thing is that I have requested adding this 😂 and even I've implemented firing. After the time - it seems that it was a bad decision to make and it seems that downshift doesnt fire handlers for that case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions