(this: UI5Element, value: PropertyValue)
| 1268 | }, |
| 1269 | |
| 1270 | set(this: UI5Element, value: PropertyValue) { |
| 1271 | const ctor = this.constructor as typeof UI5Element; |
| 1272 | const oldState = origGet ? origGet.call(this) : this._state[prop]; |
| 1273 | |
| 1274 | const isDifferent = oldState !== value; |
| 1275 | if (isDifferent) { |
| 1276 | // if the decorator is on a setter, use it for storage |
| 1277 | if (origSet) { |
| 1278 | origSet.call(this, value); |
| 1279 | } else { |
| 1280 | this._state[prop] = value; |
| 1281 | } |
| 1282 | _invalidate.call(this, { |
| 1283 | type: "property", |
| 1284 | name: prop, |
| 1285 | newValue: value, |
| 1286 | oldValue: oldState, |
| 1287 | }); |
| 1288 | |
| 1289 | if (this._rendered) { |
| 1290 | // the component is already rendered, indicating it is not the constructor - |
| 1291 | // therefore the attribute can be set synchronously. |
| 1292 | |
| 1293 | // get the effective value of the property, |
| 1294 | // as it might differ from the provided value |
| 1295 | const newValue = origGet ? origGet.call(this) : this._state[prop]; |
| 1296 | |
| 1297 | this._updateAttribute(prop, newValue); |
| 1298 | } |
| 1299 | |
| 1300 | if (ctor.getMetadata().isFormAssociated()) { |
| 1301 | setFormValue(this as unknown as IFormInputElement); |
| 1302 | } |
| 1303 | } |
| 1304 | }, |
| 1305 | }); |
| 1306 | } |
| 1307 |
nothing calls this directly
no test coverage detected