Open kcrisman opened 4 years ago
The code insists on nrows dividing the number of entries, with 1..99 it works. So the question is whether this behaviour should be changed.
Well, that is not in any of the several sources for documentation I found, so it presumably is a change (the examples on the Sage wiki even have screen shots?)
* ``u = selector(values, label=None, nrows=None, ncols=None,
buttons=False)`` - a dropdown menu or buttons (get buttons
if ``nrows``, ``ncols``, or ``buttons`` is set, otherwise a
dropdown menu)
or
- ``nrows`` - an integer (default: None); if given determines
the number of rows of buttons; if given buttons option below
is set to True
Sometime next week I hope to have a more stable document available, by the way - but the documentation that exists in various places is all pretty similar, it's just a matter of actually implementing that API in a few ways that changed because of Python or other changes.
There are explicit checks for clean divisibility: https://github.com/sagemath/sagecell/blob/master/interact_sagecell.py#L768 This is not written by me, so they have been in place for at least 6 years. Dropping them off leads to errors in JavaScript as apparently those controls can't handle such cases. Trying your example in CoCalc - it works well, while Jupyter seems to completely ignore nrows no matter if division is clean or not.
There are explicit checks for clean divisibility: https://github.com/sagemath/sagecell/blob/master/interact_sagecell.py#L768 This is not written by me, so they have been in place for at least 6 years. Dropping them off leads to errors in JavaScript as apparently those controls can't handle such cases.
That's unfortunate. I would say to leave this issue open, then, but obviously it's not worth trying to dig deeper this instant.
Trying your example in CoCalc - it works well, while Jupyter seems to completely ignore nrows no matter if division is clean or not.
That's not surprising, but definitely useful info.
nrows
doesn't seem to do anything here: