Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Aug 6, 2022. It is now read-only.

Conversation

@tschaffter
Copy link
Member

@tschaffter tschaffter commented Jul 17, 2021

The Angular Material Date Picker enables to select a date range. This date range is used here to filter challenges based on their start date. This filter is implemented as a re-usable filter <sage-date-range-filter>.

@tschaffter tschaffter self-assigned this Jul 17, 2021
@tschaffter tschaffter mentioned this pull request Jul 17, 2021
@tschaffter
Copy link
Member Author

I now get the following error related to the filters likely entering in a loop of read/emit events.

ERROR InternalError: too much recursion
    emitState http://localhost:4200/main.js:148872
    set values http://localhost:4200/main.js:148869
    getState http://localhost:4200/main.js:148757
    emitState http://localhost:4200/main.js:148873
    set values http://localhost:4200/main.js:148869
    getState http://localhost:4200/main.js:148757
    emitState http://localhost:4200/main.js:148873
    set values http://localhost:4200/main.js:148869
    getState http://localhost:4200/main.js:148757
    emitState http://localhost:4200/main.js:148873
    set values http://localhost:4200/main.js:148869
    getState http://localhost:4200/main.js:148757
    emitState http://localhost:4200/main.js:148873
    set values http://localhost:4200/main.js:148869
    getState http://localhost:4200/main.js:148757
    emitState http://localhost:4200/main.js:148873
    set values http://localhost:4200/main.js:148869
    getState http://localhost:4200/main.js:148757
    emitState http://localhost:4200/main.js:148873
    set values http://localhost:4200/main.js:148869
    getState http://localhost:4200/main.js:148757
    emitState http://localhost:4200/main.js:148873
    set values http://localhost:4200/main.js:148869
    getState http://localhost:4200/main.js:148757
    emitState http://localhost:4200/main.js:148873
    set values http://localhost:4200/main.js:148869
    getState http://localhost:4200/main.js:148757
    emitState http://localhost:4200/main.js:148873
    set values http://localhost:4200/main.js:148869
    getState http://localhost:4200/main.js:148757
    emitState http://localhost:4200/main.js:148873
    set values http://localhost:4200/main.js:148869
    getState http://localhost:4200/main.js:148757
    emitState http://localhost:4200/main.js:148873
    set values http://localhost:4200/main.js:148869
    getState http://localhost:4200/main.js:148757
    emitState http://localhost:4200/main.js:148873
    set values http://localhost:4200/main.js:148869
    getState http://localhost:4200/main.js:148757
    emitState http://localhost:4200/main.js:148873
    set values http://localhost:4200/main.js:148869
    getState http://localhost:4200/main.js:148757
    emitState http://localhost:4200/main.js:148873
    set values http://localhost:4200/main.js:148869
    getState http://localhost:4200/main.js:148757

@tschaffter tschaffter changed the title Add date range filter Add date range filter and fix checkbox filter Jul 19, 2021
@tschaffter
Copy link
Member Author

tschaffter commented Jul 19, 2021

Bug

  • The name and value of the search terms filters are "": "". For some reason the name is not properly captured initially. When typing terms (e.g. "ehr"), the updated query then correctly becomes "searchTerms": "ehr".

SOLUTION: The reason is because the search terms filter values have not been initialized with [values]. Therefore, the emptyFilterState was emitted by the search terms filter. Setting [values] solves the issue.

@tschaffter tschaffter marked this pull request as draft July 19, 2021 14:47
@tschaffter tschaffter marked this pull request as ready for review July 20, 2021 03:52
@tschaffter tschaffter merged commit 4c2572e into release-0.1.0 Jul 20, 2021
@tschaffter tschaffter deleted the add-date-range-filter branch July 20, 2021 03:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants