question

Upvotes
Accepted
791 11 16 19

'api' property on Grid element

Please explain why isn't 'api' property available on a Grid element?

#technology#productapi
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
Upvotes
Accepted
61 1 0 1

Since Grid is a custom element, grid element is not defined immediately after the page load. The `api` property will only be available after the element is defined and configured. So, set a method on the `whenDefined` property in the configuration object to handle custom task after the initialization. `whenDefined` method will guaranteed availability of the `api` property on a grid element.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.