Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi Jose,
I am continuing to integrate your plugin into my application. As I was going through the integration process, I found the need to be able to manually trigger a refresh of the list. A 'refresh' consists of:
-A call to _invokeAjaxCall()
-When that is completed, a call to _moreBtn() to decided whether or not to show the "Show More" btn.
-Caching the list results in the scoped variable cachedList
When I was examining the codebase, I saw that the above sequence was repeated 3 times within the _create() function, so I thought it might be best to just refactor it into its own method.
I decided to make it a public method because in my application, I am using the plugin in a pop-over panel view. Whenever the popover is opened, I wanted to be able to update the URL that I am making my GET request to in the AJAX callback, and then trigger a list refresh.
I was also pondering caching the DOM reference to the list element (instead of passing it in as an argument to the listDOMRef parameter). Might be a little cleaner.
Check out the updates and let me know what you think! I just added them on to the latest version of the storeAjaxCallbackContext branch code in your repository.
Thanks!
-Rohit K