Move textSearchCounter to static variable (#4257)
* Move textSearchCounter to static variable * Add test for checkbox bug * Add test for checkbox bug
This commit is contained in:
parent
ddad7b503d
commit
77d958c9d4
@ -57,6 +57,16 @@ describe('Checks Text-filter + Case Sensitive + Regex', () => {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('check multiple regex option', () => {
|
||||||
|
cy.loadAndVisitProject('food.mini');
|
||||||
|
cy.columnActionClick('Shrt_Desc', ['Text filter']);
|
||||||
|
cy.columnActionClick('Shrt_Desc', ['Text filter']);
|
||||||
|
cy.get('#regexCheckbox0').should('be.visible');
|
||||||
|
cy.get('#regexCheckbox1').should('be.visible').click();
|
||||||
|
cy.get('#regexCheckbox0').should('not.be.checked');
|
||||||
|
cy.get('#regexCheckbox1').should('be.checked');
|
||||||
|
});
|
||||||
|
|
||||||
it('check Invert option and Reset Option', () => {
|
it('check Invert option and Reset Option', () => {
|
||||||
cy.loadAndVisitProject('food.small');
|
cy.loadAndVisitProject('food.small');
|
||||||
cy.columnActionClick('Shrt_Desc', ['Text filter']);
|
cy.columnActionClick('Shrt_Desc', ['Text filter']);
|
||||||
|
@ -41,12 +41,12 @@ class TextSearchFacet extends Facet {
|
|||||||
this._query = config.query || null;
|
this._query = config.query || null;
|
||||||
this._timerID = null;
|
this._timerID = null;
|
||||||
|
|
||||||
this.textSearchFacetCounterForLabels = 0;
|
|
||||||
|
|
||||||
this._initializeUI();
|
this._initializeUI();
|
||||||
this._update();
|
this._update();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static textSearchFacetCounterForLabels = 0;
|
||||||
|
|
||||||
reset() {
|
reset() {
|
||||||
this._query = null;
|
this._query = null;
|
||||||
this._div.find(".input-container input").each(function() { this.value = ""; });
|
this._div.find(".input-container input").each(function() { this.value = ""; });
|
||||||
@ -203,9 +203,9 @@ class TextSearchFacet extends Facet {
|
|||||||
};
|
};
|
||||||
|
|
||||||
_uniqueIdForLabels() {
|
_uniqueIdForLabels() {
|
||||||
return this.textSearchFacetCounterForLabels++;
|
return TextSearchFacet.textSearchFacetCounterForLabels++;
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
|
|
||||||
TextSearchFacet.reconstruct = function(div, uiState) {
|
TextSearchFacet.reconstruct = function(div, uiState) {
|
||||||
|
Loading…
Reference in New Issue
Block a user