mirror of
https://github.com/discourse/discourse.git
synced 2025-01-01 16:36:19 +08:00
FIX: correclty allows to untoggle a fk toggle (#30404)
This commit is contained in:
parent
ebb6f1c2d2
commit
f392259e3f
|
@ -8,7 +8,7 @@ export default class FKControlToggle extends Component {
|
|||
|
||||
@action
|
||||
handleInput() {
|
||||
this.args.field.set(!this.args.value);
|
||||
this.args.field.set(!this.args.field.value);
|
||||
}
|
||||
|
||||
<template>
|
||||
|
|
|
@ -31,6 +31,14 @@ module(
|
|||
await formKit().submit();
|
||||
|
||||
assert.deepEqual(data, { foo: true });
|
||||
|
||||
await formKit().field("foo").toggle();
|
||||
|
||||
assert.form().field("foo").hasValue(false);
|
||||
|
||||
await formKit().submit();
|
||||
|
||||
assert.deepEqual(data, { foo: false });
|
||||
});
|
||||
|
||||
test("when disabled", async function (assert) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user