Skip to content
This repository has been archived by the owner on Nov 28, 2023. It is now read-only.

Commit

Permalink
Merge pull request #18 from FynnZW/master
Browse files Browse the repository at this point in the history
 Fix: items computed instead of method (Kirby 3.7.)
  • Loading branch information
rasteiner authored Jul 8, 2022
2 parents 48cb124 + fca5a93 commit 5a902c3
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,23 @@ panel.plugin("rasteiner/k3-pagesdisplay-section", {
default: true,
},
},
methods: {
items(data) {
if(this.controls === false) return data;
computed: {
items() {
let data = o.computed.items.call(this);

data = o.methods.items.call(this, data);
if (this.controls === false) {
for (const item of data) {
delete item.flag
delete item.options
}
return data;
}

if(this.controls === "flag") {
for(const item of data) {
delete item.flag.click
if (this.controls === "flag") {
for (const item of data) {
delete item.options
}
return data;
}

return data;
Expand Down

0 comments on commit 5a902c3

Please sign in to comment.