Socket
Socket
Sign inDemoInstall

@lion/form-core

Package Overview
Dependencies
Maintainers
1
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.7.2 to 0.7.3

6

CHANGELOG.md
# Change Log
## 0.7.3
### Patch Changes
- a7b27502: Sync name to parent form group conditionally and allow overriding. Also fix sync properly to prevent infinite loop.
## 0.7.2

@@ -4,0 +10,0 @@

2

package.json
{
"name": "@lion/form-core",
"version": "0.7.2",
"version": "0.7.3",
"description": "Form-core contains all essential building blocks for creating form fields and fieldsets",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -122,4 +122,3 @@ /* eslint-disable class-methods-use-this */

) {
// @ts-expect-error not all choice inputs have a name prop, because this mixin does not have a strict contract with form control mixin
this.name = changedProperties.get('name');
this._syncNameToParentFormGroup();
}

@@ -237,2 +236,16 @@ }

/**
* Override this in case of extending ChoiceInputMixin and requiring
* to sync differently with parent form group name
* Right now it checks tag name match where the parent form group tagname
* should include the child field tagname ('checkbox' is included in 'checkbox-group')
*/
_syncNameToParentFormGroup() {
// @ts-expect-error not all choice inputs have a name prop, because this mixin does not have a strict contract with form control mixin
if (this._parentFormGroup.tagName.includes(this.tagName)) {
// @ts-expect-error
this.name = this._parentFormGroup.name;
}
}
/**
* @param {boolean} checked

@@ -239,0 +252,0 @@ */

@@ -46,2 +46,4 @@ import { Constructor } from '@open-wc/dedupe-mixin';

_syncNameToParentFormGroup(): void;
_toggleChecked(ev: Event): void;

@@ -48,0 +50,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc