Skip to content

Commit

Permalink
tabs lazy_load (#340)
Browse files Browse the repository at this point in the history
* tabs `lazy_load`

* /n

potatoes
  • Loading branch information
Paul-Bob authored Feb 4, 2025
1 parent 1928a33 commit 56bc92d
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docs/3.0/tabs.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,19 @@ end
```

</Option>

<Option name="`lazy_load`">

<VersionReq version="3.17.0" />

The `lazy_load` option enables deferred loading of tab content, improving performance by fetching data only when the tab is clicked. By default, `lazy_load` is set to `false`, ensuring that all tabs load immediately. However, in form views, this option is automatically disabled to prevent data loss during form submission.

```ruby{2}
tabs do
tab "Address", lazy_load: true do
# ...
end
end
```

</Option>

0 comments on commit 56bc92d

Please sign in to comment.