@lemon-fe/components 1.2.0 → 1.2.1

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.
@@ -2,7 +2,7 @@ import type { BaseOptionType, SelectProps } from 'antd/lib/select';
2
2
  import React from 'react';
3
3
  import type { ICellEditorParams } from '@ag-grid-community/core';
4
4
  import type { ICellEditorReactComp } from '@ag-grid-community/react';
5
- export declare type SelectEditorParams = Pick<SelectProps<any, BaseOptionType>, 'disabled' | 'options' | 'virtual' | 'showSearch' | 'listHeight' | 'allowClear' | 'mode'> & {
5
+ export declare type SelectEditorParams = Pick<SelectProps<any, BaseOptionType>, 'disabled' | 'options' | 'virtual' | 'showSearch' | 'listHeight' | 'allowClear' | 'mode' | 'optionFilterProp'> & {
6
6
  fieldNames?: {
7
7
  label: string;
8
8
  value: string;
@@ -16,7 +16,7 @@ export declare type SelectEditorParams = Pick<SelectProps<any, BaseOptionType>,
16
16
  */
17
17
  action?: 'next' | 'stop' | 'none';
18
18
  };
19
- declare const _default: React.ForwardRefExoticComponent<ICellEditorParams<any, any, any> & Pick<SelectProps<any, BaseOptionType>, "disabled" | "mode" | "virtual" | "allowClear" | "showSearch" | "options" | "listHeight"> & {
19
+ declare const _default: React.ForwardRefExoticComponent<ICellEditorParams<any, any, any> & Pick<SelectProps<any, BaseOptionType>, "disabled" | "mode" | "virtual" | "allowClear" | "showSearch" | "optionFilterProp" | "options" | "listHeight"> & {
20
20
  fieldNames?: {
21
21
  label: string;
22
22
  value: string;
@@ -23,6 +23,8 @@ export default /*#__PURE__*/forwardRef(function SelectEditor(props, ref) {
23
23
  valueByOption = props.valueByOption,
24
24
  showSearch = props.showSearch,
25
25
  listHeight = props.listHeight,
26
+ _props$optionFilterPr = props.optionFilterProp,
27
+ optionFilterProp = _props$optionFilterPr === void 0 ? 'value' : _props$optionFilterPr,
26
28
  _props$action = props.action,
27
29
  action = _props$action === void 0 ? 'next' : _props$action;
28
30
  var _useState = useState(props.value),
@@ -88,6 +90,7 @@ export default /*#__PURE__*/forwardRef(function SelectEditor(props, ref) {
88
90
  style: {
89
91
  width: '100%'
90
92
  },
93
+ optionFilterProp: optionFilterProp,
91
94
  onChange: function onChange(changedValue, opt) {
92
95
  if (valueByOption) {
93
96
  setValue(opt);
@@ -16,7 +16,7 @@ declare const Editors: {
16
16
  Text: React.ForwardRefExoticComponent<import("@ag-grid-community/core").ICellEditorParams<any, any, any> & import("./typings").TextEditorParams<any> & React.RefAttributes<import("@ag-grid-community/react").ICellEditorReactComp>>;
17
17
  Date: React.ForwardRefExoticComponent<import("@ag-grid-community/core").ICellEditorParams<any, any, any> & import("./typings").DateEditorParams<any> & React.RefAttributes<import("@ag-grid-community/react").ICellEditorReactComp>>;
18
18
  Number: React.ForwardRefExoticComponent<import("@ag-grid-community/core").ICellEditorParams<any, any, any> & import("./typings").NumberEditorParams<any> & React.RefAttributes<import("@ag-grid-community/react").ICellEditorReactComp>>;
19
- Select: React.ForwardRefExoticComponent<import("@ag-grid-community/core").ICellEditorParams<any, any, any> & Pick<import("antd").SelectProps<any, import("antd/lib/select").BaseOptionType>, "disabled" | "mode" | "virtual" | "allowClear" | "showSearch" | "options" | "listHeight"> & {
19
+ Select: React.ForwardRefExoticComponent<import("@ag-grid-community/core").ICellEditorParams<any, any, any> & Pick<import("antd").SelectProps<any, import("antd/lib/select").BaseOptionType>, "disabled" | "mode" | "virtual" | "allowClear" | "showSearch" | "optionFilterProp" | "options" | "listHeight"> & {
20
20
  fieldNames?: {
21
21
  label: string;
22
22
  value: string;
package/package.json CHANGED
@@ -1,18 +1,22 @@
1
1
  {
2
2
  "name": "@lemon-fe/components",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "> TODO: description",
5
5
  "homepage": "",
6
6
  "license": "ISC",
7
7
  "author": "鲁盛杰 <lusj@cnlemon.net>",
8
+ "sideEffects": [
9
+ "es/index.less",
10
+ "src/index.less"
11
+ ],
8
12
  "main": "es/index.js",
9
13
  "files": [
10
14
  "es"
11
15
  ],
12
16
  "scripts": {
13
17
  "build": "father build",
14
- "test": "echo \"Error: run tests from root\" && exit 1",
15
- "prepublish": "npm run build"
18
+ "prepublish": "npm run build",
19
+ "test": "echo \"Error: run tests from root\" && exit 1"
16
20
  },
17
21
  "dependencies": {
18
22
  "@ag-grid-community/client-side-row-model": "29.2.0",
@@ -62,5 +66,5 @@
62
66
  "publishConfig": {
63
67
  "registry": "https://registry.npmjs.org"
64
68
  },
65
- "gitHead": "bc6eefb9acd1c267e15c7cf8132b4d866d3eb9ca"
69
+ "gitHead": "32c25ae162a45c94c5a4f791a9c6f3456f4ca4f7"
66
70
  }