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

renderAjax on reopen of modal #77

Closed
fennellgb23 opened this issue Jun 27, 2015 · 2 comments
Closed

renderAjax on reopen of modal #77

fennellgb23 opened this issue Jun 27, 2015 · 2 comments

Comments

@fennellgb23
Copy link

I'm having a problem with kartik\editable\Editable. Here are the steps to produce.

  1. Click on item to open a modal with an kartik\editable\Editable in it. (body of modal is rendered with renderAjax from a jquery $.post().done() )
  2. Use editable and change data (works perfectly).
  3. Close modal
  4. Reopen modal by doing same click on item (no refresh of page)
  5. kartik\editable\Editable does not work

NOTE: If I refresh page and start from step 1 get same results
NOTE2: Can do same steps with other components (i.e. datepicker) and not have same problem on a reopen of the modal.

@kartik-v
Copy link
Owner

You need to check your app code whenever you are overwriting markup via AJAX as that typically break the jQuery plugins initialized on elements that are overwritten.

Ensure the Editable plugin is reinitialized after the content is rendered. Also you may want to try the new destroy method as described in the issues #87 and #100.

@jotapeserra
Copy link

jotapeserra commented Mar 16, 2018

@kartik-v i cant get that done right... do you have an example of this please?
edit:
i found that if you execute
initEditablePopover('editableId-targ')
that re initialize editable after ajax has reloaded

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

No branches or pull requests

3 participants