Browse Source

Revert accidental docs API regen

copilot/fix-publish-docs-job
copilot-swe-agent[bot] 2 months ago
committed by GitHub
parent
commit
3969c27471
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 14
      docs/api/component.md

14
docs/api/component.md

@ -177,16 +177,16 @@ also before rendering the component
### Parameters
* `query` **([String][1] | [Function][4])** Component type or matcher function
* `opts` **[Object][2]** Search options (optional, default `{}`)
* `opts.max` **[Number][9]?** Maximum number of matches before exiting
* `query` **([String][1] | Function)** Component type or matcher function
* `opts` **[Object][2]?** Search options
* `opts.max` **[Number][12]?** Maximum number of matches before exiting
### Examples
```javascript
const allImages = component.findType('image');
console.log(allImages[0]) // prints the first found component
const someComponents = component.findType((cmp) => cmp.getType() === 'something', { max: 2 });
```
@ -199,7 +199,7 @@ If no component is found, it returns `undefined`.
### Parameters
* `query` **([String][1] | [Function][4])** Component type or matcher function
* `query` **([String][1] | Function)** Component type or matcher function
### Examples
@ -208,6 +208,7 @@ const image = component.findFirstType('image');
if (image) {
console.log(image);
}
const firstImage = component.findFirstType((cmp) => cmp.is('image'));
```
@ -239,13 +240,14 @@ also before rendering the component
### Parameters
* `query` **([String][1] | [Function][4])** Component type or matcher function
* `query` **([String][1] | Function)** Component type or matcher function
### Examples
```javascript
const Section = component.closestType('section');
console.log(Section);
const namedSection = component.closestType((cmp) => cmp.getName() === 'Section');
```

Loading…
Cancel
Save