Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thing edit: Fix changing ID shows wrong value & Always show UID #2475

Merged
merged 1 commit into from
Mar 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<f7-list-input v-if="createMode" label="Thing ID" type="text" placeholder="Required" :value="thing.ID"
@input="changeUID" info="Note: cannot be changed after the creation"
required validate pattern="[A-Za-z0-9_\-]+" error-message="Required. A-Z,a-z,0-9,_,- only" />
<f7-list-input v-else label="Thing UID" type="text" :input="false" disabled>
<f7-list-input label="Thing UID" type="text" :input="false" disabled>
<span slot="input">
{{ thing.UID }}
<clipboard-icon v-if="thing.UID && ready" :value="thing.UID" tooltip="Copy UID" style="pointer-events: initial !important" />
Expand Down Expand Up @@ -62,7 +62,7 @@ export default {
: [this.thing.thingTypeUID, this.thing.ID].join(':')
},
changeUID (event) {
this.thing.ID = event.target.value
this.$set(this.thing, 'ID', event.target.value)
if (this.createMode) this.thing.UID = this.computedThingUid()
},
updateBridge (value) {
Expand Down
Loading