fix(field): put submitted prop in interaction state mixin

This commit is contained in:
Joren Broekema 2020-03-24 14:29:31 +01:00 committed by Thomas Allmer
parent 2b2d6b34aa
commit 530cb31089
2 changed files with 11 additions and 4 deletions

View file

@ -39,6 +39,13 @@ export const InteractionStateMixin = dedupeMixin(
prefilled: { prefilled: {
type: Boolean, type: Boolean,
}, },
/**
* True when user has attempted to submit the form, e.g. through a button
* of type="submit"
*/
submitted: {
type: Boolean,
},
}; };
} }

View file

@ -1,14 +1,14 @@
import { LitElement } from '@lion/core';
import { import {
defineCE,
expect, expect,
fixture, fixture,
unsafeStatic,
html, html,
defineCE,
triggerFocusFor,
triggerBlurFor, triggerBlurFor,
triggerFocusFor,
unsafeStatic,
} from '@open-wc/testing'; } from '@open-wc/testing';
import sinon from 'sinon'; import sinon from 'sinon';
import { LitElement } from '@lion/core';
import { InteractionStateMixin } from '../src/InteractionStateMixin.js'; import { InteractionStateMixin } from '../src/InteractionStateMixin.js';
export function runInteractionStateMixinSuite(customConfig) { export function runInteractionStateMixinSuite(customConfig) {