Skip to content

Commit

Permalink
Merge pull request #7860 from opengovsg/release-v6.158.2
Browse files Browse the repository at this point in the history
build: release v6.158.2
  • Loading branch information
KenLSM authored Nov 7, 2024
2 parents a9223b3 + 11b8b61 commit 96fcd29
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 12 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,18 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [v6.158.2](https://github.com/opengovsg/FormSG/compare/v6.158.1...v6.158.2)

- fix: use settimeout instead of debounce [`#7856`](https://github.com/opengovsg/FormSG/pull/7856)
- fix: add debounce to break infinite call loop (#7848) [`#7849`](https://github.com/opengovsg/FormSG/pull/7849)

#### [v6.158.1](https://github.com/opengovsg/FormSG/compare/v6.158.0...v6.158.1)

> 5 November 2024

- fix: add debounce to break infinite call loop [`#7848`](https://github.com/opengovsg/FormSG/pull/7848)
- build: release v6.158.0 [`#7847`](https://github.com/opengovsg/FormSG/pull/7847)
- build: release 6.158.1 [`1a9c868`](https://github.com/opengovsg/FormSG/commit/1a9c868d4c2e3b15229a331c5e1e64cf48b58de2)

#### [v6.158.0](https://github.com/opengovsg/FormSG/compare/v6.157.0...v6.158.0)

Expand Down
4 changes: 2 additions & 2 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "form-frontend",
"version": "6.158.1",
"version": "6.158.2",
"homepage": ".",
"type": "module",
"private": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
VisuallyHidden,
VStack,
} from '@chakra-ui/react'
import { debounce, get } from 'lodash'
import { get } from 'lodash'
import simplur from 'simplur'

import { DATE_DISPLAY_FORMAT } from '~shared/constants/dates'
Expand Down Expand Up @@ -439,15 +439,20 @@ const ChildrenBody = ({
items={
MYINFO_ATTRIBUTE_MAP[subField].fieldOptions as string[]
}
onChange={debounce(
(option) =>
onChange={(option) => {
// prevent updates if there's no change to the values
// there's an infinite loop on the update
// upgrading to v8.xx, or v9.xx doesn't seem to have resolved the issue
// https://github.com/downshift-js/downshift/issues/1511#issuecomment-1598307130

setTimeout(() =>
// This is bad practice but we have no choice because our
// custom Select doesn't forward the event.
// FIXME: Fix types
// @ts-expect-error type inference issue
setValue(fieldPath, option, { shouldValidate: true }),
200,
{ leading: true },
)}
)
}}
/>
<FormErrorMessage>
{childrenSubFieldError?.message}
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "FormSG",
"description": "Form Manager for Government",
"version": "6.158.1",
"version": "6.158.2",
"homepage": "https://form.gov.sg",
"authors": [
"FormSG <[email protected]>"
Expand Down

0 comments on commit 96fcd29

Please sign in to comment.