Skip to content

Commit

Permalink
fix(core): export and fix cat-time value changes (#561)
Browse files Browse the repository at this point in the history
Co-authored-by: DDoe <[email protected]>
  • Loading branch information
ddoe8 and DDoe authored Sep 13, 2024
1 parent e748445 commit 369da92
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion angular/projects/catalyst/src/lib/catalyst.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { DialogModule } from '@angular/cdk/dialog';
import { CommonModule } from '@angular/common';
import { ModuleWithProviders, NgModule } from '@angular/core';
import { defineCustomElements } from '@haiilo/catalyst/loader';
import { DatetimeComponent } from './datetime/datetime.component';
import { CatDialogActionsComponent } from './dialog/dialog-actions.component';
import { CatDialogHeaderComponent } from './dialog/dialog-header.component';
import { CatDialogComponent } from './dialog/dialog.component';
Expand All @@ -14,7 +15,6 @@ import { SelectValueAccessorDecorator } from './directives/select-value-accessor
import { TextValueAccessor } from './directives/text-value-accessor';
import { TimeValueAccessor } from './directives/time-value-accessor';
import { ValueAccessorDecorator } from './directives/value-accessor-decorator';
import { DatetimeComponent } from './datetime/datetime.component';

const CatComponents = [
Components.CatAlert,
Expand All @@ -41,6 +41,7 @@ const CatComponents = [
Components.CatTab,
Components.CatTabs,
Components.CatTextarea,
Components.CatTime,
Components.CatToggle,
Components.CatTooltip
];
Expand Down
7 changes: 7 additions & 0 deletions core/src/components/cat-time/cat-time.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,13 @@ export class CatTime {
}
}

@Watch('value')
onValueChanged(value: string, oldValue: string) {
if (value !== oldValue) {
this.syncValue(value);
}
}

/**
* Emitted when the value is changed.
*/
Expand Down

0 comments on commit 369da92

Please sign in to comment.