Skip to content

Commit

Permalink
fix: ensure dynamic list buttons don't submit
Browse files Browse the repository at this point in the history
Related to #808
  • Loading branch information
Skaiir committed Dec 12, 2023
1 parent 13f7170 commit fb36827
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export default class RepeatRenderManager {
<RowsRenderer { ...elementProps } />
</LocalExpressionContext.Provider>
</div>
<button class="fjs-repeat-row-remove" aria-label={ `Remove list item ${index + 1}` } onClick={ () => onDeleteItem(index) }>
<button class="fjs-repeat-row-remove" type="button" aria-label={ `Remove list item ${index + 1}` } onClick={ () => onDeleteItem(index) }>
<div class="fjs-repeat-row-remove-icon-container">
<DeleteSvg />
</div>
Expand Down Expand Up @@ -164,12 +164,12 @@ export default class RepeatRenderManager {

return <div className="fjs-repeat-render-footer" style={ repeaterField.allowAddRemove ? { marginRight: 32 } : { justifyContent: 'center' } }>
{
showAdd ? <button class="fjs-repeat-render-add" ref={ addButtonRef } onClick={ onAddItem }>
showAdd ? <button class="fjs-repeat-render-add" type="button" ref={ addButtonRef } onClick={ onAddItem }>
<><AddSvg /> { 'Add new' }</>
</button> : null
}
{
collapseEnabled ? <button class="fjs-repeat-render-collapse" onClick={ toggle }>
collapseEnabled ? <button class="fjs-repeat-render-collapse" type="button" onClick={ toggle }>
{
isCollapsed
? <><ExpandSvg /> { `Expand all (${values.length})` }</>
Expand Down

0 comments on commit fb36827

Please sign in to comment.