Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update api-reference - data-bind--hidden is an incorrrect attribute - should be data-wp-bind--hidden #59955

Merged
merged 1 commit into from
Mar 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/interactivity/docs/api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Interactivity API directives use the `data-` prefix. Here's an example of direct
Toggle
</button>

<p id="p-1" data-bind--hidden="!context.isOpen">
<p id="p-1" data-wp-bind--hidden="!context.isOpen">
This element is now visible!
</p>
</div>
Expand Down Expand Up @@ -652,10 +652,10 @@ const { state } = store( "myPlugin", {
} );
```

And then, the string value `"state.isPlaying"` is used to assign the result of this selector to `data-bind--hidden`.
And then, the string value `"state.isPlaying"` is used to assign the result of this selector to `data-wp-bind--hidden`.

```html
<div data-bind--hidden="!state.isPlaying" ... >
<div data-wp-bind--hidden="!state.isPlaying" ... >
<iframe ...></iframe>
</div>
```
Expand All @@ -668,7 +668,7 @@ The example below is getting `state.isPlaying` from `otherPlugin` instead of `my

```html
<div data-wp-interactive="myPlugin">
<div data-bind--hidden="otherPlugin::!state.isPlaying" ... >
<div data-wp-bind--hidden="otherPlugin::!state.isPlaying" ... >
<iframe ...></iframe>
</div>
</div>
Expand Down