Skip to content

Commit

Permalink
fix: always expand when uncollapsible
Browse files Browse the repository at this point in the history
Related to #808
  • Loading branch information
Skaiir committed Dec 11, 2023
1 parent 68e88a8 commit bef6d3a
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ export default class RepeatRenderManager {
const values = get(data, dataPath) || [];

const nonCollapsedItems = this._getNonCollapsedItems(repeaterField);
const isCollapsed = sharedRepeatState.isCollapsed && values.length > nonCollapsedItems;
const collapseEnabled = !repeaterField.disableCollapse && (values.length > nonCollapsedItems);
const isCollapsed = collapseEnabled && sharedRepeatState.isCollapsed;

const hasChildren = repeaterField.components && repeaterField.components.length > 0;
const showRemove = repeaterField.allowAddRemove && hasChildren;

Expand Down Expand Up @@ -123,7 +125,7 @@ export default class RepeatRenderManager {

const nonCollapsedItems = this._getNonCollapsedItems(repeaterField);
const collapseEnabled = !repeaterField.disableCollapse && (values.length > nonCollapsedItems);
const isCollapsed = sharedRepeatState.isCollapsed;
const isCollapsed = collapseEnabled && sharedRepeatState.isCollapsed;

const hasChildren = repeaterField.components && repeaterField.components.length > 0;
const showAdd = repeaterField.allowAddRemove && hasChildren;
Expand Down

0 comments on commit bef6d3a

Please sign in to comment.