-
Notifications
You must be signed in to change notification settings - Fork 85
Description
In the Server Protocol docs, under Optimizing responses, it says that:
Server-side code is free to optimize its response by only returning HTML that matches the selector. For example, you might prefer to not render an expensive sidebar if the sidebar is not targeted.
I have large tables where I need to swap out table rows; each tr tag has an ID. The server response includes only the tr tag, so the entire response contents match the ID selector. However, unpoly can't find the ID in the response and updates the body instead of the table row.
If the server returns the entire table, then unpoly correctly updates the table. I also tried having the server return the tbody tag of the table, but unpoly couldn't extract the table row.
Then also tried assigning the ID to the tbody tag, and same result as tr - the content loads in the body tag.
The only way that I've encountered to get a tbody or tr tag swapped is to send the entire table from the server. That's still more efficient than the entire page, but it seems like a bug to me.