[OpenNMS/opennms] 946189: NMS-20280: Clamp the open-picker count in TimeCont...

Scott Theleman via opennms-cvs <[email protected]>
Newsgroups gmane.network.opennms.cvs
Message-ID <OpenNMS/opennms/push/refs/heads/jira/NMS-20280-onms-timepicker/[email protected]>
  Branch: refs/heads/jira/NMS-20280-onms-timepicker
  Home:   https://github.com/OpenNMS/opennms
  Commit: 94618960ecce0ec6ae4f426162e1fe4e9144a077
      https://github.com/OpenNMS/opennms/commit/94618960ecce0ec6ae4f426162e1fe4e9144a077
  Author: Scott Theleman <[email protected]>
  Date:   2026-09-02 (Wed, 02 Sep 2026)

  Changed paths:
    M ui/src/components/Common/TimeControls.vue
    M ui/tests/components/Common/TimeControls.test.ts

  Log Message:
  -----------
  NMS-20280: Clamp the open-picker count in TimeControls

openPickerCount was a bare increment/decrement on OnmsDatePicker's show/hide.
A hide with no matching show -- unmount ordering, or a third picker added
later -- would drive it negative, and a subsequent show would only bring it
back to 0. The dismissal latch reads `> 0`, so it would see "no picker open"
while one was on screen and take the next preset click as a range selection
rather than a dismissal.

Only `> 0` is ever read, so that failure mode is silent rather than loud.
Clamping the decrement makes the latch immune to it regardless of how the
events pair up. The two inline handlers become named onPickerShow /
onPickerHide.



To unsubscribe from these emails, change your notification settings at https://github.com/OpenNMS/opennms/settings/notifications


_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/wiki/index.php?page=MailingListFaq
opennms-cvs mailing list

To *unsubscribe* or change your subscription options, see the bottom of this page:
https://lists.sourceforge.net/lists/listinfo/opennms-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.