From 9685b9cad957165d64a4afa30aebf66c0ddeb1b8 Mon Sep 17 00:00:00 2001 From: Du Peng Date: Fri, 5 Jan 2024 15:08:47 +0100 Subject: [PATCH] (bug) unable to show extended prices of space --- CHANGELOG.md | 1 + .../pricing/spaces/configure-extended-prices-button.tsx | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 054aae94a..401f387c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Next release - translation files added for Swedish +- Fix a bug: unable to show extended prices of space ## v6.3.8 2023 December 29 diff --git a/app/frontend/src/javascript/components/pricing/spaces/configure-extended-prices-button.tsx b/app/frontend/src/javascript/components/pricing/spaces/configure-extended-prices-button.tsx index 826d8e9b1..bd39bc46d 100644 --- a/app/frontend/src/javascript/components/pricing/spaces/configure-extended-prices-button.tsx +++ b/app/frontend/src/javascript/components/pricing/spaces/configure-extended-prices-button.tsx @@ -1,4 +1,4 @@ -import { ReactNode, useState } from 'react'; +import { ReactNode, useState, useEffect } from 'react'; import * as React from 'react'; import { Price } from '../../../models/price'; import { useTranslation } from 'react-i18next'; @@ -28,6 +28,10 @@ export const ConfigureExtendedPricesButton: React.FC>(prices); const [showList, setShowList] = useState(false); + useEffect(() => { + setExtendedPrices(prices); + }, [prices]); + /** * Return the number of hours, user-friendly formatted */