@hzab/form-render 1.6.15 → 1.6.16
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/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -397,7 +397,7 @@ const Addition: ArrayBaseMixins["Addition"] = (props) => {
|
|
|
397
397
|
{...props}
|
|
398
398
|
onClick={(e) => {
|
|
399
399
|
// 如果添加数据后将超过当前页,则自动切换到下一页
|
|
400
|
-
const total = array?.field?.value
|
|
400
|
+
const total = array?.field?.value?.length || 0;
|
|
401
401
|
if (showPagination && total === totalPage * pageSize + 1 && isFn(changePage)) {
|
|
402
402
|
changePage(totalPage + 1);
|
|
403
403
|
}
|
|
@@ -191,7 +191,9 @@ const RemoteSelect: React.FC<RemoteSelectProps> = ({
|
|
|
191
191
|
const getSelectionStatus = () => {
|
|
192
192
|
if (mode === "multiple") {
|
|
193
193
|
if (!Array.isArray(selectedValue)) return false;
|
|
194
|
-
const selectedValues = (selectedValue || [])?.map((opt) =>
|
|
194
|
+
const selectedValues = (selectedValue || [])?.map((opt) =>
|
|
195
|
+
(isObject(opt) as unknown as Record<string, any>) ? opt?.value ?? opt?.value : opt,
|
|
196
|
+
);
|
|
195
197
|
return selectedValues.includes(value);
|
|
196
198
|
}
|
|
197
199
|
|