Skip to content
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

The bond table should remember its collapsed status when rerun reactively #36

Closed
disberd opened this issue Jul 13, 2024 · 2 comments · Fixed by #37
Closed

The bond table should remember its collapsed status when rerun reactively #36

disberd opened this issue Jul 13, 2024 · 2 comments · Fixed by #37

Comments

@disberd
Copy link
Owner

disberd commented Jul 13, 2024

No description provided.

@sprig
Copy link

sprig commented Dec 4, 2024

Personally I would appreciate a way to create it collapsed in the first place.

EDIT:
Note, in case others want this; Rather simple to do by adding

collapsedBT(t)=htl"""
	<div>
	$t
	<script>
  	const script = document.currentScript;

	let pe=script.parentElement;
	let pbs=pe.getElementsByTagName("bondtable-container");
	let pb=pbs[0];

        pb.classList.add('collapsed');
	</script>
	</div>
"""

and then returning wrapping any table you want to collapse by default with the above.

@disberd
Copy link
Owner Author

disberd commented Dec 5, 2024

Makes sense as an option @sprig. I'll include a keyword argument in the constructor when fixing this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants