Skip to content

Commit

Permalink
🚧 Code Comments related to Vue 3
Browse files Browse the repository at this point in the history
  • Loading branch information
ConradSollitt committed Jun 17, 2020
1 parent 0605290 commit e5ebda3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/to-do-list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ TODO List
dataformsjs\js\plugins\filter.js
- Search code for `onRouteUnload`
Will this still be needed on the final Vue 3 Release?
** See latest code comments, a work-around in the file can likely be made.
Need to test and confirm though.
- Prevent console warning when using DataFormsJS [json-data] control?
[Vue warn]: Failed to resolve component: json-data
- See search screen on places demo if using Vue 3:
Expand Down
6 changes: 6 additions & 0 deletions js/plugins/filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,12 @@
// search the source code for `const cached = compileCache[key];`.
// This issue seems to apply only to [filter.js] and not similar code in [sort.js].
// The reason is not yet known however Vue 3 is still in Beta at the time this code was added.
//
// ** Additional Update after latest testing - It appears the issue may have to due with
// Anonymous functions on the event handler `el.addEventListener('click', function () {...})`
// Other plugins such as [sort.js] use actual functions `addEventListener('click', sort.sortColumn);`
// NOTE - this has not been confirmed yet and will be tested more in the future.
// In the meantime this code works well with both Vue 2 and Vue 3.
if (app.activeVueModel !== null && Vue.createApp !== undefined) {
var elements = document.querySelectorAll('[data-filter-setup="setup"],[data-set-filter-setup="setup"]');
Array.prototype.forEach.call(elements, function (el) {
Expand Down

0 comments on commit e5ebda3

Please sign in to comment.