@flowgram.ai/form-antd-materials 0.2.30 → 0.2.32
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/dist/esm/index.js
CHANGED
|
@@ -1733,7 +1733,7 @@ var OpSelect = styled6(Select2)`
|
|
|
1733
1733
|
|
|
1734
1734
|
// src/components/condition-row/hooks/useOp.tsx
|
|
1735
1735
|
var { useToken: useToken3 } = theme3;
|
|
1736
|
-
function useOp({ rule, op, onChange }) {
|
|
1736
|
+
function useOp({ rule, op, onChange, readonly }) {
|
|
1737
1737
|
const options2 = useMemo7(
|
|
1738
1738
|
() => Object.keys(rule || {}).map((_op) => ({
|
|
1739
1739
|
...opConfigs[_op] || {},
|
|
@@ -1751,6 +1751,7 @@ function useOp({ rule, op, onChange }) {
|
|
|
1751
1751
|
styles: {
|
|
1752
1752
|
popup: { root: { maxHeight: 400, minWidth: 230, overflow: "auto" } }
|
|
1753
1753
|
},
|
|
1754
|
+
disabled: readonly,
|
|
1754
1755
|
className: "op-select",
|
|
1755
1756
|
size: "small",
|
|
1756
1757
|
value: op,
|
|
@@ -1773,7 +1774,8 @@ function ConditionRow({ style, value, onChange, readonly }) {
|
|
|
1773
1774
|
const { renderOpSelect, opConfig } = useOp({
|
|
1774
1775
|
rule,
|
|
1775
1776
|
op: operator,
|
|
1776
|
-
onChange: (v) => onChange({ ...value, operator: v })
|
|
1777
|
+
onChange: (v) => onChange({ ...value, operator: v }),
|
|
1778
|
+
readonly
|
|
1777
1779
|
});
|
|
1778
1780
|
const targetSchema = useMemo8(() => {
|
|
1779
1781
|
const targetType = rule?.[operator] || null;
|