feat: add locator to saveEditedXBlockData to fix xblock refresh#5
Conversation
d8677e6 to
5ad4bcb
Compare
5ad4bcb to
5842e5a
Compare
MaferMazu
left a comment
There was a problem hiding this comment.
✅ @bra-i-am, thanks for this PR, it worked as expected.
For context:
Why we needed this
We needed this to refresh the XBlock iframe when saving information in the XBlock fields.
Current behavior
When we edit an XBlock field with the pencil option and click save, we trigger handleSaveEditedXBlockData because it is the default behavior and has a configureXBlockId. But when we trigger it programmatically with xblock-exam-questionbank to save the collection info, the system doesn't pass the configureXBlockId.
What change
We are enabling the locator to be passed, so handleSaveEditedXBlockData refreshes the iframe.
Note
We know it is not ideal to edit the core, and we don't have this change in our map for now to send to upstream, but it was the only way we found to refresh the XBlock iframe.
PRs related:
Description
This PR allows sending the locator to the
handleSaveEditedXBlockDataso an XBlock can send the signal to refresh the UI like this:Why we needed this
We needed this to refresh the XBlock iframe when saving information in the XBlock fields.
Current behavior
When we edit an XBlock field with the pencil option and click save, we trigger
handleSaveEditedXBlockDatabecause it is the default behavior and has aconfigureXBlockId. But when we trigger it programmatically with xblock-exam-questionbank to save the collection info, the system doesn't pass theconfigureXBlockId.What change
We are enabling the locator to be passed, so
handleSaveEditedXBlockDatarefreshes the iframe.Note
We know it is not ideal to edit the core, and we don't have this change in our map for now to send to upstream, but it was the only way we found to refresh the XBlock iframe.
PRs related: