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
When the PickList is focused, I want to have a glowing border like below:
When the PickList is opened and I select an Item from the DropdownList, normally the DropdownList should collapse and the focus should be kept on the PickList. I can achieve this through the following code:
import React from 'react';
import ReactDOM from 'react-dom';
import PickList from 'ui/components/picklists/index.react';
const PT = React.PropTypes;
class MyPickList extends PickList {
constructor(props) {
super(props);
}
itemSelected (item) {
super.toggleHidden();
super.itemSelected(item);
ReactDOM.findDOMNode(this).firstChild.focus();
}
}
module.exports = MyPickList;
The only problem with this approach is that, when you select an Item the focus is lost from the PickList and then programmatically focused back, which causes a short flickering.
Same questions: is there a better way to achieve this? Would you consider a refactor to make this more flexible?
The text was updated successfully, but these errors were encountered:
Related to #87
When the PickList is focused, I want to have a glowing border like below:
When the PickList is opened and I select an Item from the DropdownList, normally the DropdownList should collapse and the focus should be kept on the PickList. I can achieve this through the following code:
The only problem with this approach is that, when you select an Item the focus is lost from the PickList and then programmatically focused back, which causes a short flickering.
Same questions: is there a better way to achieve this? Would you consider a refactor to make this more flexible?
The text was updated successfully, but these errors were encountered: