Open charlessuh opened 9 months ago
Callback should be gated by hadUpdated
/isConnected
or attached later in the component lifecycle.
I'm having a peculiar time reproing this outside of the demo you sent, like it's related to some load time realities. @charlessuh how are you actually running into this situation? I feel like the fix in a one liner, but without a failing test I'm always worried about adding things to the library without a clear reason.
I can also reproduce it by going here and typing the following into the console:
const group = document.createElement('sp-action-group');
document.body.appendChild(group);
const button = document.createElement('sp-button');
group.appendChild(button);
Maybe sp-action-group
is not loaded and registered when you're executing this code?
Code of conduct
Impacted component(s)
sp-action-group
Expected behavior
No response
Actual behavior
Using
appendChild
to programatically add children to asp-action-group
throws an error:Screenshots
No response
What browsers are you seeing the problem in?
No response
How can we reproduce this issue?
Sample code that illustrates the problem
No response
Logs taken while reproducing problem
No response