Fix: styling of OH input, fix #1489

This commit is contained in:
Pieter Vander Vennet 2023-07-18 02:11:28 +02:00
parent 3c5bde1ae3
commit 064f87537f
4 changed files with 2 additions and 10 deletions

View file

@ -1,7 +1,5 @@
.oh-table {
width: 100%;
height: 100%;
text-align: center;
word-break: normal;
word-wrap: normal;

View file

@ -2,10 +2,8 @@ import { UIEventSource } from "../../Logic/UIEventSource"
import OpeningHoursPickerTable from "./OpeningHoursPickerTable"
import { OH, OpeningHour } from "./OpeningHours"
import { InputElement } from "../Input/InputElement"
import BaseUIElement from "../BaseUIElement"
export default class OpeningHoursPicker extends InputElement<OpeningHour[]> {
public readonly IsSelected: UIEventSource<boolean> = new UIEventSource<boolean>(false)
private readonly _ohs: UIEventSource<OpeningHour[]>
private readonly _backgroundTable: OpeningHoursPickerTable
@ -21,10 +19,6 @@ export default class OpeningHoursPicker extends InputElement<OpeningHour[]> {
this._backgroundTable.ConstructElement()
}
InnerRender(): BaseUIElement {
return this._backgroundTable
}
GetValue(): UIEventSource<OpeningHour[]> {
return this._ohs
}

View file

@ -34,7 +34,7 @@ export default class OpeningHoursPickerTable extends InputElement<OpeningHour[]>
constructor(source?: UIEventSource<OpeningHour[]>) {
super()
this.source = source ?? new UIEventSource<OpeningHour[]>([])
this.SetStyle("width:100%;height:100%;display:block;")
this.SetClass("w-full block")
}
IsValid(t: OpeningHour[]): boolean {

View file

@ -38,7 +38,7 @@
}
</script>
<div class="inline-flex flex-col">
<div class="inline-flex flex-col w-full">
{#if inline}
<Inline key={config.freeform.key} {tags} template={config.render}>
<ValidatedInput