-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add maxSpareCols/ maxSpareRows options #225
Comments
Hi deeta ! |
Thanks MuyBien, this is what i am currently doing as a work around, but changing the settings in onChange to limit Rows has some unhandled errors. One case was when user copies more rows (20 rows for example) and pastes into this table which limits at 10 rows. I was thinking it would be easy and clean to set it directly on handsontable during init |
Working on it right now, will be in 0.7.5 |
Now the settings minRows, minCols, maxRows and maxCols are available |
@warpech Hey man! As far as I understand none of the mentioned settings addresses the original request. The closest one is With that, am I missing something or should we re-open this issue? |
Hi @jouyuy what is the scenario of adding rows in your project?
|
Imagine the following scenario:
What I need is to limit the maximum amount of spare columns so that there is always 1 spare column. When using I found a way to achieve desired behaviour by combining dynamic |
You should also be able to determine if your table should add a spare column by checking |
What do I do if I find out that I shouldn't add that column in |
sorry @jouyuy I should have asked you for some details first. How a user is able to add a blank column: menu, data erase, autofill, context menu? It defines a hook that can be used here. |
@AMBudnik User is not explicitly able to add a blank column - it gets added automatically as soon as all cells have values. |
Can you share a scenario where the column is being added against your requirements? |
@AMBudnik I can think of at least 3 ways to end up with more than 1 spare columns in my case (i.e. when you have
|
Thank you for sharing the details. We should remember that if a column already had a value but it has been erased manually by a user action it's value is |
@AMBudnik Your example doesn't handle 1st scenario (which is spamming |
Actually, I can mark this topic as a feature request. |
This feature request is closed. It will be automatically reopened after we attach it to a milestone. |
Is there a way to set a max spare rows property?
For example: start with minSpareRows: 1 and create up to a maximum of n rows
The text was updated successfully, but these errors were encountered: