Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
} else {
reversedDirection = sortBy.direction === SortByDirection.asc ? SortByDirection.desc : SortByDirection.asc;
}
// tslint:disable-next-line:no-unused-expression
onSort && onSort(event, columnIndex, reversedDirection, extraData);
}
return {
className: css(styles.tableSort, isSortedBy && styles.modifiers.selected),
'aria-sort': isSortedBy ? `${sortBy.direction}ending` : 'none',
children: (
{label}
)
};
};
value={
typeaheadInputValue !== null
? typeaheadInputValue
: this.getDisplay(selections as string, 'text') || ''
}
type="text"
onClick={this.onClick}
onChange={this.onChange}
onFocus={this.handleFocus}
autoComplete="off"
disabled={isDisabled}
/>
{selections && (
<button> {
this.clearSelection(e);
onClear(e);
}}
aria-label={ariaLabelClear}
type="button"
disabled={isDisabled}
>
</button>
)}
)}
{variant === SelectVariant.typeaheadMulti && !customContent && (
<div></div>
icon = null,
render = true,
...props
}: ButtonProps) => {
if (!render) {
return <p>no render</p>;
}
const Component = component as any;
const isButtonElement = Component === 'button';
return (
{(icon && variant === 'link') && <span>{icon}</span>}
{children}
isHovered,
isPlain,
onToggle,
onEnter,
parentRef,
id,
type,
...props
} = this.props;
return (
<button type="{(type" id="{id}"> onToggle && onToggle(!isOpen)}
aria-expanded={isOpen}
onKeyDown={this.onKeyDown}
>
{children}
</button>
);
}
}
isDisabled && styles.modifiers.disabled,
isPlain && styles.modifiers.plain,
isTypeahead && styles.modifiers.typeahead,
className
)}
onClick={_event => {
if (!isDisabled) {
onToggle(true);
}
}}
onKeyDown={this.onKeyDown}
>
{children}
<button aria-label="{ariaLabelToggle}"> {
_event.stopPropagation();
onToggle(!isExpanded);
if (isExpanded) {
onClose();
}
}}
disabled={isDisabled}
>
</button>
)}
);
render() {
const { component, children, className, href, show, ...rest } = this.props;
const Component = component;
return (
{children}
);
}
}
aria-activedescendant={typeaheadActiveChild && typeaheadActiveChild.id}
id="select-multi-typeahead-typeahead"
aria-label={ariaLabelTypeAhead}
placeholder={placeholderText as string}
value={typeaheadInputValue !== null ? typeaheadInputValue : ''}
type="text"
onChange={this.onChange}
onClick={this.onClick}
onFocus={this.handleFocus}
autoComplete="off"
disabled={isDisabled}
/>
{selections && (Array.isArray(selections) && selections.length > 0) && (
<button> {
this.clearSelection(e);
onClear(e);
}}
aria-label={ariaLabelClear}
type="button"
disabled={isDisabled}
>
</button>
)}
)}
{customContent && isExpanded && (
'aria-label': ariaLabel = null,
icon = null,
ouiaContext = null,
ouiaId = null,
tabIndex = null as number,
...props
}: ButtonProps & InjectedOuiaProps) => {
const Component = component as any;
const isButtonElement = Component === 'button';
return (