request update when inputType is updated to rerender
This commit is contained in:
@@ -49,6 +49,8 @@ export class UmbPropertyEditorUIDatePickerElement extends UmbLitElement {
|
||||
|
||||
@property({ type: Array, attribute: false })
|
||||
public set config(config: Array<PropertyEditorConfigDefaultData>) {
|
||||
const oldVal = this._inputType;
|
||||
|
||||
// Format string prevalue/config
|
||||
this._format = config.find((x) => x.alias === 'format')?.value;
|
||||
const pickTime = this._format?.includes('H') || this._format?.includes('m');
|
||||
@@ -67,6 +69,8 @@ export class UmbPropertyEditorUIDatePickerElement extends UmbLitElement {
|
||||
// TODO: Warren - Need to deal with offSetTime prevalue/config
|
||||
// Currently the date picker in uui-iinput does not change based on this config
|
||||
this._offsetTime = config.find((x) => x.alias === 'offsetTime')?.value;
|
||||
|
||||
this.requestUpdate('_inputType', oldVal);
|
||||
}
|
||||
|
||||
render() {
|
||||
|
||||
@@ -10,7 +10,6 @@ describe('UmbPropertyEditorUIDatePickerElement', () => {
|
||||
beforeEach(async () => {
|
||||
element = await fixture(html` <umb-property-editor-ui-date-picker></umb-property-editor-ui-date-picker> `);
|
||||
inputElement = element.shadowRoot?.querySelector('uui-input') as UUIInputElement;
|
||||
console.log(element);
|
||||
});
|
||||
|
||||
it('is defined with its own instance', () => {
|
||||
|
||||
Reference in New Issue
Block a user