mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-04 20:21:46 +00:00
react-tagsinput: expose renderLayout (#36304)
* react-tagsinput: expose renderLayout Exposing `renderLayout` type to be imported by consuming projects. * Update index.d.ts
This commit is contained in:
committed by
Daniel Rosenwasser
parent
5029800621
commit
350abf6a9a
Vendored
+4
-1
@@ -1,6 +1,7 @@
|
||||
// Type definitions for react-tagsinput 3.19
|
||||
// Project: https://github.com/olahol/react-tagsinput
|
||||
// Definitions by: Michael Macnair <https://github.com/mykter>
|
||||
// Richard Tan <https://github.com/chardos>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
@@ -42,6 +43,8 @@ declare namespace TagsInput {
|
||||
readonly tag: Tag;
|
||||
}
|
||||
|
||||
type RenderLayout = (tagComponent: React.Component[], inputComponent: React.Component) => React.ReactChild;
|
||||
|
||||
interface ReactTagsInputProps extends React.Props<TagsInput> {
|
||||
value: Tag[];
|
||||
onChange: (tags: Tag[], changed: Tag[], changedIndexes: number[]) => void;
|
||||
@@ -65,7 +68,7 @@ declare namespace TagsInput {
|
||||
tagDisplayProp?: string | null;
|
||||
renderTag?: (props: RenderTagProps) => React.ReactNode;
|
||||
renderInput?: (props: RenderInputProps) => React.ReactNode;
|
||||
renderLayout?: (tagComponents: React.Component[], inputComponent: React.Component) => React.ReactChild;
|
||||
renderLayout?: RenderLayout;
|
||||
preventSubmit?: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user