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

Modifiable processing element #209

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

martijndwars
Copy link

Dynatable allows its user to specify a processingText which is then wrapped inside a <span>. However, span's do not allow block level elements, limiting the possible processing indicators. In particular, I wanted to use SpinKit, which was not possible.

This PR adds a processingTemplate with the <span> for backwards compatibility. By overwriting the processingTemplate, a user can get rid of the span and instead use e.g. SpinKit HTML.

@@ -787,7 +792,7 @@

this.position = function() {
var $processing = $('#dynatable-processing-' + obj.element.id),
$span = $processing.children('span'),
$span = $processing.find('>:first-child'),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this selector change going to cause issues for calculating the total height of the processing indicator, if someone changes the template to be multiple sibling elements on the top level? E.g., if I call dynatable with processingTemplate: '<div>{text}</div><div>Please hold on</div>, this selector will only grab the first div. Maybe we want to change this line to be:

$span = $processing.children()

?

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 this pull request may close these issues.

2 participants