@antscorp/antsomi-ui 1.3.5-beta.864 → 1.3.5-beta.865

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.
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import type { PayloadInfo } from '@antscorp/antsomi-ui/es/types';
2
3
  export type TDisplayFormat = 'number' | 'percentage' | 'currency' | 'datetime';
3
4
  type DisplayFormatProps = {
@@ -54,7 +54,11 @@ export function MatchesAny(props) {
54
54
  threshold: 0,
55
55
  initialIsIntersecting: false,
56
56
  onChange(isIntersecting) {
57
- if (isIntersecting) {
57
+ // Only load more items if the search input is empty and not in external search mode.
58
+ // This prevents loading more items when the user is searching for something specific.
59
+ const isNoNeedToLoadMore = !!searchValue && !isExternalSearch;
60
+ if (isIntersecting && !isNoNeedToLoadMore) {
61
+ // Load more items when the user reaches the end of the list.
58
62
  onLoadMore();
59
63
  }
60
64
  },
@@ -379,5 +383,5 @@ export function MatchesAnySelect(props) {
379
383
  ...dropdownStyle,
380
384
  display: 'none',
381
385
  padding: 0,
382
- }, loading: loading, status: props.status || (error ? 'error' : undefined), ...restProps }), !!error && _jsx(Text, { className: 'ant-form-item-explain-error', type: 'danger', children: error })] }) }));
386
+ }, loading: loading, status: props.status || (error ? 'error' : undefined), ...restProps }), !!error && (_jsx(Text, { className: "ant-form-item-explain-error", type: "danger", children: error }))] }) }));
383
387
  }
@@ -3,4 +3,5 @@
3
3
  * Asynchronously loads the component for TemplateListing
4
4
  *
5
5
  */
6
+ /// <reference types="react" />
6
7
  export declare const TemplateListing: (props: import("./types").TemplateListingProps<{}>) => JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antscorp/antsomi-ui",
3
- "version": "1.3.5-beta.864",
3
+ "version": "1.3.5-beta.865",
4
4
  "description": "An enterprise-class UI design language and React UI library.",
5
5
  "sideEffects": [
6
6
  "dist/*",