qt-ui-kit 1.0.104 → 1.0.106

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -160,9 +160,10 @@ type SearchResult = {
160
160
  type Props$2 = {
161
161
  loading?: boolean;
162
162
  results?: SearchResult[];
163
+ initialText?: string;
163
164
  onUpdate?: (query: string) => void;
164
165
  };
165
- declare function SearchBar({ loading, results, onUpdate }: Props$2): react_jsx_runtime.JSX.Element;
166
+ declare function SearchBar({ loading, results, initialText, onUpdate, }: Props$2): react_jsx_runtime.JSX.Element;
166
167
 
167
168
  type FilterButtonKey = "fires" | "unread" | "done" | "more" | IntegrationService;
168
169
  type NavButtonConfig = {
package/dist/index.d.ts CHANGED
@@ -160,9 +160,10 @@ type SearchResult = {
160
160
  type Props$2 = {
161
161
  loading?: boolean;
162
162
  results?: SearchResult[];
163
+ initialText?: string;
163
164
  onUpdate?: (query: string) => void;
164
165
  };
165
- declare function SearchBar({ loading, results, onUpdate }: Props$2): react_jsx_runtime.JSX.Element;
166
+ declare function SearchBar({ loading, results, initialText, onUpdate, }: Props$2): react_jsx_runtime.JSX.Element;
166
167
 
167
168
  type FilterButtonKey = "fires" | "unread" | "done" | "more" | IntegrationService;
168
169
  type NavButtonConfig = {
package/dist/index.js CHANGED
@@ -16894,7 +16894,12 @@ function Search({
16894
16894
  // src/components/organisms/search_bar/search_bar.tsx
16895
16895
  var import_react5 = require("react");
16896
16896
  var import_jsx_runtime40 = require("react/jsx-runtime");
16897
- function SearchBar({ loading, results, onUpdate }) {
16897
+ function SearchBar({
16898
+ loading,
16899
+ results,
16900
+ initialText,
16901
+ onUpdate
16902
+ }) {
16898
16903
  const [query, setQuery] = (0, import_react5.useState)("");
16899
16904
  (0, import_react5.useEffect)(() => {
16900
16905
  if (!onUpdate) {
@@ -16902,6 +16907,11 @@ function SearchBar({ loading, results, onUpdate }) {
16902
16907
  }
16903
16908
  onUpdate(query);
16904
16909
  }, [query]);
16910
+ (0, import_react5.useEffect)(() => {
16911
+ if (initialText) {
16912
+ setQuery(initialText);
16913
+ }
16914
+ }, [initialText]);
16905
16915
  const clearQuery = () => {
16906
16916
  setQuery("");
16907
16917
  };