Skip to content

Commit 5dbe5d5

Browse files
committed
doc(live-component): fix doc about array values checkboxes data-model attribute
1 parent 3673127 commit 5dbe5d5

File tree

3 files changed

+3
-9
lines changed

3 files changed

+3
-9
lines changed

src/LiveComponent/assets/dist/live_controller.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -369,9 +369,6 @@ class ValueStore {
369369
return this.pendingProps[normalizedName];
370370
}
371371
if (this.props[normalizedName] !== undefined) {
372-
if (Array.isArray(this.props[normalizedName])) {
373-
return [...this.props[normalizedName]];
374-
}
375372
return this.props[normalizedName];
376373
}
377374
return getDeepData(this.props, normalizedName);

src/LiveComponent/assets/src/Component/ValueStore.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,6 @@ export default class {
5050
}
5151

5252
if (this.props[normalizedName] !== undefined) {
53-
if (Array.isArray(this.props[normalizedName])) {
54-
return [...this.props[normalizedName]];
55-
}
5653
return this.props[normalizedName];
5754
}
5855

src/LiveComponent/doc/index.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -531,9 +531,9 @@ value on checked. If no ``value`` is set, the checkbox will set a boolean value:
531531

532532
<input type="checkbox" data-model="agreeToTerms">
533533

534-
<input type="checkbox" data-model="foods" value="pizza">
535-
<input type="checkbox" data-model="foods" value="tacos">
536-
<input type="checkbox" data-model="foods" value="sushi">
534+
<input type="checkbox" data-model="foods[]" value="pizza">
535+
<input type="checkbox" data-model="foods[]" value="tacos">
536+
<input type="checkbox" data-model="foods[]" value="sushi">
537537

538538
``select`` and ``radio`` elements are a bit easier: use these to either set a
539539
single value or an array of values::

0 commit comments

Comments
 (0)