File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
docs/versions/release-notes Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -205,6 +205,37 @@ will now be refused for import as it may cause unexpected results.
205205
206206Importing modules exported from lower major version is still supported.
207207
208+ ### New front hooks beforeSave and afterSave
209+
210+ ` Simplicite.UI.BusinessObject ` contains 2 new hooks:
211+
212+ ``` javascript
213+ /**
214+ * Front hook before calling Ajax object.save()
215+ * @param ctn Form container
216+ * @param obj Object (same as this)
217+ * @param index record index (edit list)
218+ * @param cbk callback(true|false) (must return 'true' to continue or 'false' to stop/reject promise)
219+ */
220+ beforeSave (ctn , obj , index , cbk ) {
221+ cbk && cbk (true );
222+ }
223+
224+ /**
225+ * Front hook after calling Ajax object.save()
226+ * @param ctn Form container
227+ * @param obj Object (same as this)
228+ * @param index record index (edit list)
229+ * @param cbk callback(true|false) (must return 'true' to continue or 'false' to stop/reject promise)
230+ */
231+ afterSave (ctn , obj , index , cbk ) {
232+ cbk && cbk (true );
233+ }
234+ ```
235+
236+ NB: previous hooks ` form.beforesave ` and ` form.beforesave ` are still available but it is recomanded to use the class BusinessObject.
237+
238+
208239Fixes
209240-----
210241
You can’t perform that action at this time.
0 commit comments