aefis-core-ui 2.1.10 → 2.1.12

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.
@@ -8690,7 +8690,7 @@ const FilterPanel = props => {
8690
8690
  onApplyFilters: handleApplyFilters,
8691
8691
  manualFilters: onApplyFilters ? true : false
8692
8692
  };
8693
- if (!(configuration.length > 0)) {
8693
+ if (!(configuration.length > 0 || search)) {
8694
8694
  return null;
8695
8695
  }
8696
8696
  return /*#__PURE__*/jsxs("div", {
@@ -10477,7 +10477,7 @@ const useIsError = status => {
10477
10477
  return isError;
10478
10478
  };
10479
10479
  const RichDataTable = /*#__PURE__*/forwardRef(function RichDatatable(props, ref) {
10480
- var _props$rowActions, _props$dataTableProps, _props$dataTableProps2;
10480
+ var _props$filterPanelCon, _props$rowActions, _props$dataTableProps, _props$dataTableProps2;
10481
10481
  const didMount = useDidMount();
10482
10482
  const DataTableRef = useRef();
10483
10483
  const [currentSelection, setCurrentSelection] = useState(() => {
@@ -10717,6 +10717,7 @@ const RichDataTable = /*#__PURE__*/forwardRef(function RichDatatable(props, ref)
10717
10717
  toggleDrawer,
10718
10718
  clearSelections: () => DataTableRef.current.clearSelections()
10719
10719
  }));
10720
+ const isFilterPanelEnabled = ((_props$filterPanelCon = props.filterPanelConfig) == null ? void 0 : _props$filterPanelCon.length) > 0 || props.showFilterPanelSearch;
10720
10721
  return /*#__PURE__*/jsxs("div", {
10721
10722
  "aria-live": "polite",
10722
10723
  children: [/*#__PURE__*/jsx(TitleAndActionHeader, _extends({
@@ -10724,7 +10725,7 @@ const RichDataTable = /*#__PURE__*/forwardRef(function RichDatatable(props, ref)
10724
10725
  showExport: props.showExportButton,
10725
10726
  exportOptions: props.exportOptions,
10726
10727
  actions: props.actions && props.actions.length > 0 || props.addAction ? updateActions(props.actions, handleDrawerOpen, enableTableRowAction, selectedRowCount, Add) : undefined,
10727
- onFilterClick: props.filterPanelConfig && props.filterPanelConfig.length > 0 ? handleFilterClick : undefined,
10728
+ onFilterClick: isFilterPanelEnabled ? handleFilterClick : undefined,
10728
10729
  hasFilters: filterPanelState.filterCount > 0 || filterPanelState.sortCount > 0,
10729
10730
  disableFilterButton: isFetching
10730
10731
  }, props.titleAndActionHeaderProps)), /*#__PURE__*/jsx(DataTable, _extends({}, props, {
@@ -17525,7 +17526,7 @@ const withEvalDisable = () => Component => {
17525
17526
 
17526
17527
  // TODO: use lazyEval
17527
17528
  return safeEval(code, formState);
17528
- }, [formState.formData, formState.formContext]);
17529
+ }, [formState.formData, formState.formContext, props.disabled]);
17529
17530
  return /*#__PURE__*/jsx(MemoizedComponent, _extends({}, props, {
17530
17531
  disabled: isDisabled
17531
17532
  }));