From 88b6d4a82e660fd6dc390e94ce59c05f5d4d6b82 Mon Sep 17 00:00:00 2001 From: Quincy Morgan <2046746+quincylvania@users.noreply.github.com> Date: Thu, 15 Oct 2020 16:52:46 -0400 Subject: [PATCH] Reload date filter values after input change --- modules/ui/sections/photo_overlays.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/ui/sections/photo_overlays.js b/modules/ui/sections/photo_overlays.js index cd68bff1e..6df04b70a 100644 --- a/modules/ui/sections/photo_overlays.js +++ b/modules/ui/sections/photo_overlays.js @@ -220,11 +220,16 @@ export function uiSectionPhotoOverlays(context) { utilGetSetValue(d3_select(this), context.photos().dateFilterValue(d) || ''); }) .on('change', function(d3_event, d) { - var value = d3_select(this).property('value'); + var value = utilGetSetValue(d3_select(this)).trim(); context.photos().setDateFilter(d, value, true); + // reload the displayed dates + li.selectAll('input') + .each(function(d) { + utilGetSetValue(d3_select(this), context.photos().dateFilterValue(d) || ''); + }); }); - li + li = li .merge(liEnter) .classed('active', filterEnabled); }