mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-07-25 05:54:26 +08:00
fix(dashboard): initial title value in rename modal set to currently selected dashboard (#5821)
Co-authored-by: Srikanth Chekuri <srikanth.chekuri92@gmail.com> Co-authored-by: SagarRajput-7 <162284829+SagarRajput-7@users.noreply.github.com>
This commit is contained in:
parent
b03fadc2ec
commit
78a924d378
@ -182,6 +182,15 @@ function DashboardDescription(props: DashboardDescriptionProps): JSX.Element {
|
||||
|
||||
const { t } = useTranslation(['dashboard', 'common']);
|
||||
|
||||
// used to set the initial value for the updatedTitle
|
||||
// the context value is sometimes not available during the initial render
|
||||
// due to which the updatedTitle is set to some previous value
|
||||
useEffect(() => {
|
||||
if (selectedDashboard) {
|
||||
setUpdatedTitle(selectedDashboard.data.title);
|
||||
}
|
||||
}, [selectedDashboard]);
|
||||
|
||||
useEffect(() => {
|
||||
if (state.error) {
|
||||
notifications.error({
|
||||
|
Loading…
x
Reference in New Issue
Block a user