Ai
Checks whether the UI5 OData model has unsaved (pending) changes.
Playwright Page (or compatible subset).
Optional
OData options (modelName).
true if the model has pending changes, false otherwise.
true
false
ui5.odata.hasPendingChanges
Check if the OData model has unsaved changes (dirty state).
Returns true if model.hasPendingChanges() is true, false otherwise (including when model is not found).
Calls model.hasPendingChanges(). Useful to verify before navigating away or to assert that edits have been properly saved.
sap.ui.model.odata.v2.ODataModel, sap.ui.model.odata.v4.ODataModel
Detect unsaved changes before navigation to prevent data loss warnings.
const dirty = await hasPendingChanges(page);if (dirty) { logger.warn('Model has unsaved changes');} Copy
const dirty = await hasPendingChanges(page);if (dirty) { logger.warn('Model has unsaved changes');}
Checks whether the UI5 OData model has unsaved (pending) changes.