[Evergreen-dev] Angular changing filter value
Tiffany Little
tlittle at georgialibraries.org
Tue Jul 19 07:48:58 EDT 2022
I just audibly said "OH!" very loudly. Thank you Jane!!
Tiffany Little, PINES Services Specialist: Acquisitions
------------------------------
Georgia Public Library Service | University System of Georgia
2872 Woodcock Blvd, Suite 250 l Atlanta, GA 30341
(404) 235-7161 | tlittle at georgialibraries.org
Join our email list <http://georgialibraries.org/> for stories of Georgia
libraries making an impact in our communities.
On Sat, Jul 16, 2022 at 12:34 AM Jane Sandberg <sandbergja at gmail.com> wrote:
> Hi Tiffany,
>
> Thanks for bringing this conversation to the group! I think the issue is
> with the ViewChild you added for the GridFilterComponent. That first
> argument to ViewChild should be a selector that helps it track down which
> component you want to work with. There isn't a template reference variable
> called 'gridFilter' (ie the code never has something like
> <eg-grid-filter-control #gridFilter></eg-grid-filter-control>), so it's
> failing to find the component you want. Fortunately, the docs list some
> other selectors you may be able to use
> <https://angular.io/api/core/ViewChild>. I haven't tried it, but the
> first bullet point suggests that this might do the trick?
>
> ViewChild(GridFilterControlComponent, {static: true}) gridFilter:
> GridFilterControlComponent;
>
> Hope this helps,
>
> -Jane
>
> El vie, 15 jul 2022 a la(s) 10:06, Tiffany Little via Evergreen-dev (
> evergreen-dev at list.evergreen-ils.org) escribió:
>
>> Good morning,
>>
>> Could anyone out there tell me what I'm missing?
>>
>> I'm trying to work on this bug:
>> https://bugs.launchpad.net/evergreen/+bug/1953181
>>
>> Here's the diff of what I'm currently working with:
>> https://www.diffchecker.com/CDraK6ie
>>
>> I think I'm almost there, but I get tripped up when I get to yearChanged.
>> Everything's fine until it hits *this.gridFilter.reset()*. I get a
>> console error of "Cannot read properties of undefined (reading 'reset')
>> at FundsManagerComponent.yearChanged". I'm calling in
>> GridFilterControlComponent, and reset() comes from there. So why is it
>> undefined?
>>
>> I need it to see the new changed value from the combobox (selectedYear)
>> and then either clear the filter on the Year column, reapply from fresh,
>> and then reload the grid, or just change the value of the filter and reload
>> the grid. Whatever works.
>>
>> I'm pretty sure it's staring me in the face what I'm doing wrong, but
>> I've banged my head against it enough that I'm finally asking for help.
>>
>> (If you see any other missteps that I've made, I'm grateful for a heads
>> up on those too.)
>>
>> Thanks!
>> Tiffany
>>
>> Tiffany Little, PINES Services Specialist: Acquisitions
>>
>> ------------------------------
>>
>> Georgia Public Library Service | University System of Georgia
>>
>> 2872 Woodcock Blvd, Suite 250 l Atlanta, GA 30341
>>
>> (404) 235-7161 | tlittle at georgialibraries.org
>>
>> Join our email list <http://georgialibraries.org/> for stories of
>> Georgia libraries making an impact in our communities.
>> _______________________________________________
>> Evergreen-dev mailing list
>> Evergreen-dev at list.evergreen-ils.org
>> http://list.evergreen-ils.org/cgi-bin/mailman/listinfo/evergreen-dev
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.evergreen-ils.org/pipermail/evergreen-dev/attachments/20220719/e4790ed9/attachment.htm>
More information about the Evergreen-dev
mailing list