mirror of
https://github.com/apache/superset.git
synced 2024-09-06 22:07:34 -04:00
fix: FilterBox select lose focus when focused (#12114)
This commit is contained in:
parent
1cf4a1b3ea
commit
af130ea5e9
@ -65,27 +65,21 @@ describe('Dashboard filter', () => {
|
||||
cy.wait(aliases);
|
||||
});
|
||||
});
|
||||
xit('should apply filter', () => {
|
||||
cy.get('.Select__control input[type=text]')
|
||||
.first()
|
||||
.should('be.visible')
|
||||
.focus();
|
||||
|
||||
it('should apply filter', () => {
|
||||
cy.get('.Select__placeholder:first').click();
|
||||
|
||||
// should open the filter indicator
|
||||
cy.get('[data-test="filter"]')
|
||||
.should('be.visible', { timeout: 10000 })
|
||||
cy.get('svg[data-test="filter"]')
|
||||
.should('be.visible')
|
||||
.should(nodes => {
|
||||
expect(nodes).to.have.length(9); // this part was not working, xit-ed
|
||||
expect(nodes).to.have.length(9);
|
||||
});
|
||||
|
||||
cy.get('[data-test="chart-container"]').find('svg').should('be.visible');
|
||||
|
||||
cy.get('.Select__control input[type=text]').first().focus().blur();
|
||||
|
||||
cy.get('.Select__control input[type=text]')
|
||||
.first()
|
||||
.focus()
|
||||
.type('So', { force: true, delay: 100 });
|
||||
cy.get('.Select__control:first input[type=text]').type('So', {
|
||||
force: true,
|
||||
delay: 100,
|
||||
});
|
||||
|
||||
cy.get('.Select__menu').first().contains('South Asia').click();
|
||||
|
||||
|
@ -19,6 +19,9 @@
|
||||
"eslint-plugin-cypress": "^2.11.1"
|
||||
},
|
||||
"nyc": {
|
||||
"reporter": ["html", "json"]
|
||||
"reporter": [
|
||||
"html",
|
||||
"json"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -102,7 +102,7 @@ const Styles = styled.div`
|
||||
overflow: visible;
|
||||
`;
|
||||
|
||||
class FilterBox extends React.Component {
|
||||
class FilterBox extends React.PureComponent {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
@ -424,7 +424,6 @@ class FilterBox extends React.Component {
|
||||
|
||||
render() {
|
||||
const { instantFiltering } = this.props;
|
||||
|
||||
return (
|
||||
<Styles>
|
||||
{this.renderDateFilter()}
|
||||
|
Loading…
Reference in New Issue
Block a user