Skip to content

Commit

Permalink
simplify getUniqueDomeId
Browse files Browse the repository at this point in the history
  • Loading branch information
arshaw committed Sep 29, 2021
1 parent bb8f0cc commit c31dedb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/common/src/CalendarContent.tsx
Expand Up @@ -44,7 +44,7 @@ export class CalendarContent extends PureComponent<CalendarContentProps> {
private calendarInteractions: CalendarInteraction[]

state = {
viewLabelId: getUniqueDomId('label'),
viewLabelId: getUniqueDomId(),
}

/*
Expand Down
2 changes: 1 addition & 1 deletion packages/common/src/common/MoreLinkRoot.tsx
Expand Up @@ -58,7 +58,7 @@ export class MoreLinkRoot extends BaseComponent<MoreLinkRootProps, MoreLinkRootS

state = {
isPopoverOpen: false,
popoverId: getUniqueDomId('label'),
popoverId: getUniqueDomId(),
}

render() {
Expand Down
4 changes: 2 additions & 2 deletions packages/common/src/util/dom-manip.ts
Expand Up @@ -115,6 +115,6 @@ export function getElRoot(el: HTMLElement): ShadowRoot | Document {

let guid = 0

export function getUniqueDomId(type: string) {
return 'fc-' + type + '-' + (++guid)
export function getUniqueDomId() {
return 'fc-dom-' + (++guid)
}

0 comments on commit c31dedb

Please sign in to comment.