@rolster/react-components 19.8.17 → 19.8.19

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.
@@ -1981,7 +1981,7 @@ function RlsNavbarMenuComponent({ options, onOption }) {
1981
1981
  }
1982
1982
  const RlsNavbarMenu = require$$0.memo(RlsNavbarMenuComponent);
1983
1983
 
1984
- function PageButton({ page, onSelect }) {
1984
+ function RlsPaginationButton({ page, onSelect }) {
1985
1985
  const className = renderClassStatus('rls-pagination__page', {
1986
1986
  active: page.active
1987
1987
  });
@@ -2035,7 +2035,7 @@ function RlsPaginationComponent({ suggestions, count, filter, onPagination, posi
2035
2035
  const goLastPagination = require$$0.useCallback(() => {
2036
2036
  refreshPagination(controller.current?.goLastPage());
2037
2037
  }, [refreshPagination]);
2038
- return (jsxRuntimeExports.jsxs("div", { className: "rls-pagination", children: [jsxRuntimeExports.jsxs("div", { className: "rls-pagination__actions", children: [jsxRuntimeExports.jsx("button", { className: "rls-pagination__action", onClick: goFirstPagination, disabled: template?.firstPage, children: jsxRuntimeExports.jsx(RlsIcon, { value: "arrowhead-left" }) }), jsxRuntimeExports.jsx("button", { className: "rls-pagination__action", onClick: goPreviousPagination, disabled: template?.firstPage, children: jsxRuntimeExports.jsx(RlsIcon, { value: "arrow-ios-left" }) })] }), jsxRuntimeExports.jsxs("div", { className: "rls-pagination__body", children: [jsxRuntimeExports.jsx("div", { className: "rls-pagination__pages", children: template?.pages.map((page) => (jsxRuntimeExports.jsx(PageButton, { page: page, onSelect: goToPagination }, page.value))) }), jsxRuntimeExports.jsx("div", { className: "rls-pagination__description", children: template?.description }), jsxRuntimeExports.jsx("span", { className: "rls-pagination__count", children: suggestions.length })] }), jsxRuntimeExports.jsxs("div", { className: "rls-pagination__actions", children: [jsxRuntimeExports.jsx("button", { className: "rls-pagination__action", onClick: goNextPagination, disabled: template?.lastPage, children: jsxRuntimeExports.jsx(RlsIcon, { value: "arrow-ios-right" }) }), jsxRuntimeExports.jsx("button", { className: "rls-pagination__action", onClick: goLastPagination, disabled: template?.lastPage, children: jsxRuntimeExports.jsx(RlsIcon, { value: "arrowhead-right" }) })] })] }));
2038
+ return (jsxRuntimeExports.jsxs("div", { className: "rls-pagination", children: [jsxRuntimeExports.jsxs("div", { className: "rls-pagination__actions", children: [jsxRuntimeExports.jsx("button", { className: "rls-pagination__action", onClick: goFirstPagination, disabled: template?.firstPage, children: jsxRuntimeExports.jsx(RlsIcon, { value: "arrowhead-left" }) }), jsxRuntimeExports.jsx("button", { className: "rls-pagination__action", onClick: goPreviousPagination, disabled: template?.firstPage, children: jsxRuntimeExports.jsx(RlsIcon, { value: "arrow-ios-left" }) })] }), jsxRuntimeExports.jsxs("div", { className: "rls-pagination__body", children: [jsxRuntimeExports.jsx("div", { className: "rls-pagination__pages", children: template?.pages.map((page) => (jsxRuntimeExports.jsx(RlsPaginationButton, { page: page, onSelect: goToPagination }, page.value))) }), jsxRuntimeExports.jsx("div", { className: "rls-pagination__description", children: template?.description }), jsxRuntimeExports.jsx("span", { className: "rls-pagination__count", children: suggestions.length })] }), jsxRuntimeExports.jsxs("div", { className: "rls-pagination__actions", children: [jsxRuntimeExports.jsx("button", { className: "rls-pagination__action", onClick: goNextPagination, disabled: template?.lastPage, children: jsxRuntimeExports.jsx(RlsIcon, { value: "arrow-ios-right" }) }), jsxRuntimeExports.jsx("button", { className: "rls-pagination__action", onClick: goLastPagination, disabled: template?.lastPage, children: jsxRuntimeExports.jsx(RlsIcon, { value: "arrowhead-right" }) })] })] }));
2039
2039
  }
2040
2040
  const RlsPagination = require$$0.memo(RlsPaginationComponent);
2041
2041
 
@@ -2580,7 +2580,7 @@ function useListController({ suggestions, automatic, formControl, reference }) {
2580
2580
  ...state,
2581
2581
  value: element?.description || ''
2582
2582
  }));
2583
- changeValueInternal.current = true;
2583
+ changeValueInternal.current = !Object.is(element?.value, formControl?.value);
2584
2584
  if (valueIsDefault) {
2585
2585
  formControl?.setDefaultValue(element?.value);
2586
2586
  }
@@ -2610,6 +2610,9 @@ function useListController({ suggestions, automatic, formControl, reference }) {
2610
2610
  if (element) {
2611
2611
  setFormValue(element);
2612
2612
  }
2613
+ else if (automatic) {
2614
+ setFormValue(collection.value[0], true);
2615
+ }
2613
2616
  else {
2614
2617
  refreshState((state) => ({ ...state, value: '' }));
2615
2618
  }