plain-design 1.0.0-beta.159 → 1.0.0-beta.160

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "plain-design",
3
- "version": "1.0.0-beta.159",
3
+ "version": "1.0.0-beta.160",
4
4
  "description": "",
5
5
  "main": "dist/plain-design.min.js",
6
6
  "module": "dist/plain-design.commonjs.min.js",
@@ -1,5 +1,5 @@
1
1
  import {iTableOptionApplyCacheParam, iTableOptionGetCacheParam} from "../use/useTableOption.cache.utils";
2
- import {computed, reactive, RenderNode} from "@peryl/react-compose";
2
+ import {computed, getCurrentDesignInstance, reactive, RenderNode} from "@peryl/react-compose";
3
3
  import {tPlc} from "../../Table/plc/utils/plc.utils";
4
4
  import {createFilterOptions, iFilterOption} from "../../FilterService/utils/filter.service.utils";
5
5
  import {createEnum} from "@peryl/utils/createEnum";
@@ -104,6 +104,9 @@ export const useTableOptionFilterState = AutoModule.createRegistration(({ hooks,
104
104
  const sourceFlatPlcList = computed(() => state.getSourceFlatPlcList?.().filter(i => (!!i.props.searchField || !!i.props.field) && !i.props.noFilter));
105
105
 
106
106
  const createComputedFilterOptions = (filterMode: typeof eAutoTableFilterMode.TYPE) => {
107
+ if (!getCurrentDesignInstance()) {
108
+ console.error(`createComputedFilterOptions can not use without component context.`);
109
+ }
107
110
  return computed(() => sourceFlatPlcList.value?.map((
108
111
  {
109
112
  props: {