Skip to content

Commit d88e9b2

Browse files
authored
Merge pull request #126 from UW-Macrostrat/postgrest-scroll
Fix import searchbar issue
2 parents 855940a + 78d0c3b commit d88e9b2

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
lines changed

packages/ui-components/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## [4.3.5] - 2025-07-09
4+
5+
- Fix import issue
6+
37
## [4.3.4] - 2025-07-09
48

59
- Fix export issue

packages/ui-components/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@macrostrat/ui-components",
3-
"version": "4.3.4",
3+
"version": "4.3.5",
44
"description": "UI components for React and Blueprint.js",
55
"main": "dist/cjs/index.js",
66
"module": "dist/esm/index.js",

packages/ui-components/src/postgrest-infinite-scroll.ts

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import h from "@macrostrat/hyper";
22
import { InfiniteScrollProps, InfiniteScrollView } from "./infinite-scroll";
3-
import { SearchBar } from "../stories/search-bar.stories";
43
import { useAPIResult } from "./api";
54
import { useMemo, useState } from "react";
65
import { MultiSelect, ItemRenderer, ItemPredicate } from "@blueprintjs/select";
7-
import { MenuItem, Spinner } from "@blueprintjs/core";
6+
import { MenuItem, Spinner, InputGroup } from "@blueprintjs/core";
87

98
interface PostgRESTInfiniteScrollProps extends InfiniteScrollProps<any> {
109
id_key: string;
@@ -218,3 +217,18 @@ export function PostgRESTInfiniteScrollView(
218217
}),
219218
]);
220219
}
220+
221+
function SearchBar({ onChange, placeholder = "Search..." }) {
222+
return h(InputGroup, {
223+
className: "search-bar",
224+
size: "large",
225+
fill: true,
226+
round: false,
227+
placeholder,
228+
onChange: (e) => {
229+
const value = e.target.value;
230+
onChange(value);
231+
},
232+
leftIcon: "search",
233+
});
234+
}

0 commit comments

Comments
 (0)