-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(components/forms): update
sky-file-attachment
component to use…
… `ControlValueAccessor`; deprecate `validateFn` attribute in favor of custom form control validators; deprecate `fileChange` event in favor of form control `valueChanges` observable (#2603)
- Loading branch information
1 parent
b23b00d
commit 7a74fc7
Showing
6 changed files
with
173 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
...ts/forms/src/lib/modules/file-attachment/file-attachment/file-attachment-join-ids.pipe.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { Pipe, PipeTransform } from '@angular/core'; | ||
|
||
/** | ||
* Joins an array of IDs with a single space. | ||
* @internal | ||
*/ | ||
@Pipe({ | ||
name: 'skyFileAttachmentJoinIds', | ||
standalone: true, | ||
}) | ||
export class SkyFileAttachmentJoinIdsPipe implements PipeTransform { | ||
public transform(...ids: (string | null | undefined)[]): string | null { | ||
// Remove undefined values and join with a " ". | ||
return ids && ids.filter((id) => id).join(' '); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.