ywana-core8 0.0.151 → 0.0.152

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ywana-core8",
3
- "version": "0.0.151",
3
+ "version": "0.0.152",
4
4
  "description": "ywana-core8",
5
5
  "author": "Ernesto Roldan Garcia",
6
6
  "license": "MIT",
@@ -242,6 +242,7 @@ const TableFilters = (props) => {
242
242
  */
243
243
  const TableEditor = (props) => {
244
244
 
245
+ const site = useContext(SiteContext)
245
246
  const [pageContext, setPageContext] = useContext(PageContext)
246
247
  const { all = [], filters } = pageContext
247
248
  const { icon, title, schema, editable, canDelete, filter, actions } = props
@@ -252,9 +253,12 @@ const TableEditor = (props) => {
252
253
  }
253
254
 
254
255
  async function remove(id) {
255
- await pageContext.remove(id)
256
- pageContext.clear()
257
- setPageContext(Object.assign({}, pageContext))
256
+ const confirm = site.confirm("Are you sure ?")
257
+ if (confirm) {
258
+ await pageContext.remove(id)
259
+ pageContext.clear()
260
+ setPageContext(Object.assign({}, pageContext))
261
+ }
258
262
  }
259
263
 
260
264
  function change(rowID, cellID, value) {