Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Select): update SelectProps interface, clean up demos #2107

Merged
merged 1 commit into from May 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -10,7 +10,7 @@ import { Popover, PopoverPosition, Checkbox, Button } from '@patternfly/react-co
## Simple popover
```js
import React from 'react';
import { Popover, PopoverPosition, Checkbox, Button } from '@patternfly/react-core';
seanforyou23 marked this conversation as resolved.
Show resolved Hide resolved
import { Popover, Button } from '@patternfly/react-core';

SimplePopover = () => (
<Popover
Expand Down
@@ -1,4 +1,5 @@
import { HTMLProps, FormEvent, ReactNode } from 'react';
import { Omit } from '../../helpers/typeUtils';

export const SelectVariant: {
single: 'single';
Expand All @@ -7,11 +8,11 @@ export const SelectVariant: {
typeaheadMulti: 'typeaheadmulti';
};

export interface SelectProps extends HTMLProps<HTMLOptionElement> {
export interface SelectProps extends Omit<React.HTMLProps<HTMLOptionElement>, 'onSelect'> {
isExpanded?: boolean;
isGrouped?: boolean;
onToggle(value: boolean): void;
onSelect(event: ReactEventHandler<HTMLOptionElement, Event>, element: string, isPlaceholder: boolean): void;
onSelect(event: React.SyntheticEvent<HTMLOptionElement, Event>, element: string, isPlaceholder: boolean): void;
onClear?() : void;
placeholderText?: string | ReactNode;
selections?: string | Array<string> | null;
Expand Down
Expand Up @@ -9,7 +9,7 @@ import { Tooltip, TooltipPosition, Checkbox } from '@patternfly/react-core';
## Simple tooltip
```js
import React from 'react';
import { Tooltip, TooltipPosition, Checkbox } from '@patternfly/react-core';
import { Tooltip, TooltipPosition } from '@patternfly/react-core';

<Tooltip
position="right"
Expand Down
2 changes: 0 additions & 2 deletions packages/patternfly-4/react-core/src/demos/ToolbarDemo.md
Expand Up @@ -83,7 +83,6 @@ class ComplexToolbarDemo extends React.Component {
const { isDropDownOpen } = this.state;
return (
<Dropdown
onToggle={this.onDropDownToggle}
onSelect={this.onDropDownSelect}
position={DropdownPosition.right}
toggle={<DropdownToggle onToggle={this.onDropDownToggle}>All</DropdownToggle>}
Expand All @@ -105,7 +104,6 @@ class ComplexToolbarDemo extends React.Component {

return (
<Dropdown
onToggle={this.onKebabToggle}
onSelect={this.onKebabSelect}
position={DropdownPosition.right}
toggle={<KebabToggle onToggle={this.onKebabToggle} />}
Expand Down