-
-
Notifications
You must be signed in to change notification settings - Fork 299
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 maxItems to board definition to limit number of items in column #105
Comments
Thanks for opening a new issue. The team has been notified and will review it as soon as possible. |
Hey @rouilj. What about to help me with that? |
@marcosrocha85 said:
Sorry I don't understand what you mean by 'have source in the helper'.
I don't know what an inner routine is.
That is what I suggested for the default dropEl callback.
Again that is what I suggested. Since a user can override the dropEl function, I suggested writing a helper: isBoardOverLimit(target) that could be called by somebody re-implementing the dropEl callback. The re-implemented dropEl callback just calls The helper function knows how to:
The helper function returns True if maxItems < (the number of items in the board) and False otherwise. |
because jkanban is build on vanilla js this example can help you using dropEl callback function
this code changes the header to green in case the items count in each board is 4 items and prevents adding more. |
One of the hallmarks of Kanban is limiting WIP (work in process). There should be a standard
location for defining this. I suggest a maxItems setting.
The default
function could implement this (I assume it is used for implementing dragTo).
Also if it makes sense, create a helper function: exceed_maxItems(target) (I assume target is a board). The helper will return true if the dropped item would exceed the maximum number of items in the target board. The helper could be used by the user when they define dropEl to provide feedback on why the drop is denied.
The text was updated successfully, but these errors were encountered: