Skip to content

Commit

Permalink
build: blazor new components fixes (#304)
Browse files Browse the repository at this point in the history
  • Loading branch information
gmurray81 authored Mar 29, 2022
1 parent e51c8ce commit 8854050
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/components/chip/chip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default class IgcChipComponent extends SizableMixin(

/** Defines if the chip is selected or not. */
@property({ type: Boolean, reflect: true })
@blazorTwoWayBind('igcSelected', 'detail')
@blazorTwoWayBind('igcSelect', 'detail')
public selected = false;

/** A property that sets the color variant of the chip component. */
Expand Down
6 changes: 5 additions & 1 deletion src/components/dropdown/dropdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { styles } from './themes/light/dropdown.base.css';
import { styles as bootstrap } from './themes/light/dropdown.bootstrap.css';
import { styles as fluent } from './themes/light/dropdown.fluent.css';
import { styles as indigo } from './themes/light/dropdown.indigo.css';
import { watch } from '../common/decorators';
import { blazorSuppress, watch } from '../common/decorators';
import {
IgcPlacement,
IgcToggleComponent,
Expand Down Expand Up @@ -434,6 +434,7 @@ export default class IgcDropDownComponent
}

/** Shows the dropdown. */
@blazorSuppress()
public show(target?: HTMLElement) {
if (this.open && !target) return;

Expand All @@ -448,6 +449,7 @@ export default class IgcDropDownComponent
}

/** Toggles the open state of the dropdown. */
@blazorSuppress()
public toggle(target?: HTMLElement): void {
if (!this.open) {
this.show(target);
Expand All @@ -461,6 +463,7 @@ export default class IgcDropDownComponent
/** Navigates to the item at the specified index. If it exists, returns the found item, otherwise - null. */
public navigateTo(index: number): IgcDropDownItemComponent | null;
/** Navigates to the specified item. If it exists, returns the found item, otherwise - null. */
@blazorSuppress()
public navigateTo(value: string | number): IgcDropDownItemComponent | null {
const index =
typeof value === 'string' ? this.getItem(value).index : (value as number);
Expand All @@ -473,6 +476,7 @@ export default class IgcDropDownComponent
/** Selects the item at the specified index. If it exists, returns the found item, otherwise - null. */
public select(index: number): IgcDropDownItemComponent | null;
/** Selects the specified item. If it exists, returns the found item, otherwise - null. */
@blazorSuppress()
public select(value: string | number): IgcDropDownItemComponent | null {
const item =
typeof value === 'string'
Expand Down
1 change: 1 addition & 0 deletions src/components/input/input-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ let nextId = 0;
export interface IgcInputEventMap {
/* alternateName: inputOcurred */
igcInput: CustomEvent<string>;
/* blazorSuppress */
igcChange: CustomEvent<string>;
igcFocus: CustomEvent<void>;
igcBlur: CustomEvent<void>;
Expand Down
16 changes: 13 additions & 3 deletions src/components/toggle/utilities.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { Placement } from '@floating-ui/dom';

/**
* Common events interface for toggle components
*/
Expand Down Expand Up @@ -52,4 +50,16 @@ export interface IgcToggleComponent extends IgcToggleOptions {
/**
* Describes the preferred placement of a toggle component.
*/
export type IgcPlacement = Placement;
export type IgcPlacement =
| 'top'
| 'top-start'
| 'top-end'
| 'bottom'
| 'bottom-start'
| 'bottom-end'
| 'right'
| 'right-start'
| 'right-end'
| 'left'
| 'left-start'
| 'left-end';

0 comments on commit 8854050

Please sign in to comment.