export ElementsInspectorProps; optional id of linked Elements
Summary: a bit of refactoring since we are going to use elements inspector a lot in NT related plugins Reviewed By: jknoxville Differential Revision: D21155830 fbshipit-source-id: 0ff6acf97658bccbbed86388257bbad207fd65b4
This commit is contained in:
committed by
Facebook GitHub Bot
parent
79937f198d
commit
931bf1f14f
@@ -168,6 +168,7 @@ export {
|
|||||||
ElementAttribute,
|
ElementAttribute,
|
||||||
Element,
|
Element,
|
||||||
ElementSearchResultSet,
|
ElementSearchResultSet,
|
||||||
|
ElementsInspectorProps,
|
||||||
} from './ui/components/elements-inspector/ElementsInspector';
|
} from './ui/components/elements-inspector/ElementsInspector';
|
||||||
export {Elements} from './ui/components/elements-inspector/elements';
|
export {Elements} from './ui/components/elements-inspector/elements';
|
||||||
export {ContextMenuExtension} from './ui/components/elements-inspector/elements';
|
export {ContextMenuExtension} from './ui/components/elements-inspector/elements';
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ export type ElementAttribute = {
|
|||||||
export type ElementExtraInfo = {
|
export type ElementExtraInfo = {
|
||||||
linkedNode?: string; // id of linked node in opposite tree
|
linkedNode?: string; // id of linked node in opposite tree
|
||||||
expandWithParent?: boolean;
|
expandWithParent?: boolean;
|
||||||
|
linkedTree?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type Element = {
|
export type Element = {
|
||||||
@@ -53,7 +54,7 @@ export type Element = {
|
|||||||
extraInfo: ElementExtraInfo;
|
extraInfo: ElementExtraInfo;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default class ElementsInspector extends Component<{
|
export type ElementsInspectorProps = {
|
||||||
onElementExpanded: (key: ElementID, deep: boolean) => void;
|
onElementExpanded: (key: ElementID, deep: boolean) => void;
|
||||||
onElementSelected: (key: ElementID) => void;
|
onElementSelected: (key: ElementID) => void;
|
||||||
onElementHovered:
|
onElementHovered:
|
||||||
@@ -70,7 +71,11 @@ export default class ElementsInspector extends Component<{
|
|||||||
alternateRowColor?: boolean;
|
alternateRowColor?: boolean;
|
||||||
contextMenuExtensions?: Array<ContextMenuExtension>;
|
contextMenuExtensions?: Array<ContextMenuExtension>;
|
||||||
decorateRow?: DecorateRow;
|
decorateRow?: DecorateRow;
|
||||||
}> {
|
};
|
||||||
|
|
||||||
|
export default class ElementsInspector extends Component<
|
||||||
|
ElementsInspectorProps
|
||||||
|
> {
|
||||||
static defaultProps = {
|
static defaultProps = {
|
||||||
alternateRowColor: true,
|
alternateRowColor: true,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -151,6 +151,7 @@ export {
|
|||||||
ElementAttribute,
|
ElementAttribute,
|
||||||
Element,
|
Element,
|
||||||
ElementSearchResultSet,
|
ElementSearchResultSet,
|
||||||
|
ElementsInspectorProps,
|
||||||
} from './components/elements-inspector/ElementsInspector';
|
} from './components/elements-inspector/ElementsInspector';
|
||||||
export {Elements} from './components/elements-inspector/elements';
|
export {Elements} from './components/elements-inspector/elements';
|
||||||
export {ContextMenuExtension} from './components/elements-inspector/elements';
|
export {ContextMenuExtension} from './components/elements-inspector/elements';
|
||||||
|
|||||||
Reference in New Issue
Block a user