Bugfixes - Editor images, git-gateway auth, editor scrolling, numeric selects, object/list previews (#50)

* v1.0.0-alpha26
This commit is contained in:
Daniel Lautzenheiser
2022-10-27 12:24:30 -04:00
committed by GitHub
parent 1de3d52d57
commit 8c8a59093d
47 changed files with 794 additions and 942 deletions

View File

@ -133,7 +133,11 @@ export function registerWidget<T = unknown>(
name: string | WidgetParam<T> | WidgetParam[],
control?: string | Widget<T>['control'],
preview?: Widget<T>['preview'],
{ schema, validator, getValidValue }: WidgetOptions = {},
{
schema,
validator = () => false,
getValidValue = (value: unknown) => value,
}: WidgetOptions = {},
): void {
if (Array.isArray(name)) {
name.forEach(widget => {