@@ -181,13 +181,9 @@ export class Stepper extends StepState {
181181 const itemsToAdd = Array . isArray ( items ) ? items : [ items ]
182182
183183 // Check if adding these items would exceed maxSteps
184- if ( this . _states . length + itemsToAdd . length > config . maxStepperRows ) {
185- this . _log . error (
186- `Cannot append ${ itemsToAdd . length } rows as it exceeds the safety limit of ${ config . maxStepperRows } `
187- )
188- throw new Error (
189- `Cannot append ${ itemsToAdd . length } rows as it exceeds the safety limit of ${ config . maxStepperRows } `
190- )
184+ if ( this . _states . length + itemsToAdd . length > config . maxSteps ) {
185+ this . _log . error ( `Cannot append ${ itemsToAdd . length } rows as it exceeds the safety limit of ${ config . maxSteps } ` )
186+ throw new Error ( `Cannot append ${ itemsToAdd . length } rows as it exceeds the safety limit of ${ config . maxSteps } ` )
191187 }
192188
193189 // Try to add each item individually
@@ -233,9 +229,9 @@ export class Stepper extends StepState {
233229 const totalCombinations = processedColumns . reduce ( ( total , [ _ , arr ] ) => total * arr . length , 1 )
234230
235231 // Check if adding these combinations would exceed maxSteps
236- if ( this . _states . length + totalCombinations > config . maxStepperRows ) {
232+ if ( this . _states . length + totalCombinations > config . maxSteps ) {
237233 throw new Error (
238- `Cannot create ${ totalCombinations } combinations: would exceed maximum of ${ config . maxStepperRows } rows`
234+ `Cannot create ${ totalCombinations } combinations: would exceed maximum of ${ config . maxSteps } rows`
239235 )
240236 }
241237
@@ -314,8 +310,8 @@ export class Stepper extends StepState {
314310 const maxLength = Math . max ( ...processedColumns . map ( ( [ _ , arr ] ) => arr . length ) )
315311
316312 // Check if adding these combinations would exceed maxSteps
317- if ( this . _states . length + maxLength > config . maxStepperRows ) {
318- throw new Error ( `Cannot create ${ maxLength } combinations: would exceed maximum of ${ config . maxStepperRows } rows` )
313+ if ( this . _states . length + maxLength > config . maxSteps ) {
314+ throw new Error ( `Cannot create ${ maxLength } combinations: would exceed maximum of ${ config . maxSteps } rows` )
319315 }
320316
321317 // Check if any column has a different length
0 commit comments