The list is not updating when clicking on "Save" button. But the list is updating when click on block show "Icon".

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

ravi kant created an issue. See original summary.

dkmishra made their first commit to this issue’s fork.

dkmishra’s picture

Status: Active » Needs review
StatusFileSize
new1.56 KB

I have looked into this issue and found that the AJAX `success` callback for the "Save Note" button was not dynamically updating the DOM tree once the note data was saved to the backend. It only console-logged the response, requiring a manual toggle or refresh to show up.

I have attached a patch that addresses this:
- Updates the save button's AJAX success handler to instantly `prepend` the new note to the `.sticky-history-box ul` list component.
- Empties the textarea and resets the border styles upon a successful save.
- Adds basic client-side validation to prevent empty submissions.
- Refactored the code to conform strictly to Drupal JavaScript coding standards (using ES6 template literals instead of old string concatenation, and avoiding native `alert()` boxes).
Please review.

  • 7be2d79f committed on 1.0.x
    Issue #3592699: Fixed sticky notes list not updating after clicking the...
chaitanyadessai’s picture

@dkmishra changes merged and released thanks for your contributions.

chaitanyadessai’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.