You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 3, 2022. It is now read-only.
i like this component and i have the following enhancements to suggest:
Component should not propagate events, after consumption! => e.preventDefault();
Dragability for web Client unecesary with bad user responsabilty behavior
=> Should be turned off by property, eg: dragable= false // (default true)
Arrow Keys LEFT and RIGHT were bound to this component, but many times needed in application for other purposes
=> should optional, I would expect like on all selectable Form Elements that SPACE would select and unselct like in a checkbox
eg: keyboardMode= [Arrows|Space|None]
here my contibution (not including tristate):
(dont forget in renderLabel => onClick: this._handleToggleClick.bind(this))
as the value behind the Component (excluding tristate) is true / false, the expectation of a user is the one from a checkbox / readiobutton to select / unselect by using the SPACE key, which was not supported
the tabindex was not propagated, which in Formular Based Apps is a NO GO!
Hello,
i like this component and i have the following enhancements to suggest:
Component should not propagate events, after consumption! => e.preventDefault();
Dragability for web Client unecesary with bad user responsabilty behavior
=> Should be turned off by property, eg: dragable= false // (default true)
Arrow Keys LEFT and RIGHT were bound to this component, but many times needed in application for other purposes
=> should optional, I would expect like on all selectable Form Elements that SPACE would select and unselct like in a checkbox
eg: keyboardMode= [Arrows|Space|None]
here my contibution (not including tristate):
i also generalized the event and get rid of dedicated events for ON and OFF:
_handleToggleClick(){
if(this._disableUserInput())
return;
(dont forget in renderLabel => onClick: this._handleToggleClick.bind(this))
as the value behind the Component (excluding tristate) is true / false, the expectation of a user is the one from a checkbox / readiobutton to select / unselect by using the SPACE key, which was not supported
the tabindex was not propagated, which in Formular Based Apps is a NO GO!
Switch.defaultProps = {
tabIndex: 0
}
Switch.propTypes = {
tabIndex: PropTypes.number,
}
in render()
in the wrapper Params:
tabIndex:
${tabIndex},