Skip to content

Commit

Permalink
Merge pull request #7849 from opengovsg/release-v6.158.1
Browse files Browse the repository at this point in the history
fix: add debounce to break infinite call loop (#7848)
  • Loading branch information
KenLSM authored Nov 5, 2024
2 parents 9f8e80d + 1a9c868 commit a9223b3
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 14 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,21 @@ 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.1](https://github.com/opengovsg/FormSG/compare/v6.158.0...v6.158.1)

- 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)

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

> 5 November 2024

- build: merge release v6.157.0 to develop [`#7846`](https://github.com/opengovsg/FormSG/pull/7846)
- fix: change email summary response row to represent table row instead of cell [`#7836`](https://github.com/opengovsg/FormSG/pull/7836)
- fix(deps): bump jose from 4.15.5 to 5.9.6 [`#7800`](https://github.com/opengovsg/FormSG/pull/7800)
- fix: set table field required false to cols instead of whole field [`#7839`](https://github.com/opengovsg/FormSG/pull/7839)
- build: release v6.157.0 [`#7837`](https://github.com/opengovsg/FormSG/pull/7837)
- chore: bump version to v6.158.0 [`2426d28`](https://github.com/opengovsg/FormSG/commit/2426d28cef5d7d488d9d2d63853397aefa217003)

#### [v6.157.0](https://github.com/opengovsg/FormSG/compare/v6.156.0...v6.157.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.0",
"version": "6.158.1",
"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 { get } from 'lodash'
import { debounce, get } from 'lodash'
import simplur from 'simplur'

import { DATE_DISPLAY_FORMAT } from '~shared/constants/dates'
Expand Down Expand Up @@ -439,13 +439,15 @@ const ChildrenBody = ({
items={
MYINFO_ATTRIBUTE_MAP[subField].fieldOptions as string[]
}
onChange={(option) =>
// 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 })
}
onChange={debounce(
(option) =>
// This is bad practice but we have no choice because our
// custom Select doesn't forward the event.
// FIXME: Fix types
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.0",
"version": "6.158.1",
"homepage": "https://form.gov.sg",
"authors": [
"FormSG <[email protected]>"
Expand Down

0 comments on commit a9223b3

Please sign in to comment.