MCPcopy Create free account
hub / github.com/alephdata/aleph / render

Method render

ui/src/components/Entity/EntityActionBar.jsx:40–88  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

38 };
39
40 render() {
41 const {
42 children,
43 query,
44 result,
45 onSearchSubmit,
46 searchDisabled,
47 searchPlaceholder,
48 updateStatus,
49 writeable,
50 } = this.props;
51 const showActions = writeable && children;
52 const resultText = query.hasQuery() && <ResultText result={result} />;
53
54 return (
55 <div className="EntityActionBar">
56 <ControlGroup fill className={c({ 'show-status': !!updateStatus })}>
57 <OverflowList
58 items={showActions ? children : [resultText]}
59 collapseFrom={Boundary.END}
60 visibleItemRenderer={(item, i) => (
61 <React.Fragment key={i}>{item}</React.Fragment>
62 )}
63 overflowRenderer={this.overflowListRenderer}
64 className={Classes.BUTTON_GROUP}
65 minVisibleItems={showActions ? 0 : 1}
66 observeParents
67 />
68 <div className="EntityActionBar__right">
69 {updateStatus && (
70 <>
71 <UpdateStatus status={updateStatus} />
72 <Divider />
73 </>
74 )}
75 <SearchBox
76 onSearch={onSearchSubmit}
77 placeholder={searchPlaceholder}
78 query={query}
79 inputProps={{ disabled: searchDisabled }}
80 />
81 </div>
82 </ControlGroup>
83 {showActions && (
84 <div className="EntityActionBar__secondary">{resultText}</div>
85 )}
86 </div>
87 );
88 }
89}
90
91const mapStateToProps = (state, ownProps) => {

Callers

nothing calls this directly

Calls 1

hasQueryMethod · 0.80

Tested by

no test coverage detected