Skip to content

Commit

Permalink
Merge pull request #183 from Fliplet/feature/ID-4174
Browse files Browse the repository at this point in the history
ID-4171 [Feat] Documentation for Fliplet.Widget.findWidgets()
  • Loading branch information
tonytlwu authored Apr 11, 2024
2 parents 12e9847 + b3243e5 commit cc86ce3
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docs/API/core/widget.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,22 @@ Fliplet.Widget.findOne({ package: 'com.fiplet.image' }).then(function(instance)
});
```

### Find parent widgets

```js
Fliplet.Widget.findParents().then(function(widgets) {
// Can be called directly from the widget interface to find out all the parent widget instances of the current instance
});

Fliplet.Widget.findParents({ instanceId: 1234 }).then(function(widgets) {
// Return parent widget instances of a specific instance
});

Fliplet.Widget.findParents({ instance: 1234, filter: { package: 'com.fliplet.container' } }).then(function(widgets) {
// Return parent widget instances of a specific instance that match the specified filter
});
```

### Get the JSON schema of a widget

You can use this method to fetch the JSON schema of a widget. The following widget packages are currently supporting this feature:
Expand Down

0 comments on commit cc86ce3

Please sign in to comment.