UNPKG

ivue-material-plus

Version:

A high quality UI components Library with Vue.js

41 lines (39 loc) 949 B
function useUtils(store) { const setCurrentRow = (row) => { store.commit("setCurrentRow", row); }; const getSelectionRows = () => { return store.getSelectionRows(); }; const toggleRowSelection = (row, selected) => { store.toggleRowSelection(row, selected, false); store.updateAllSelected(); }; const clearSelection = () => { store.clearSelection(); }; const clearSort = () => { store.clearSort(); }; const sort = (prop, order) => { store.commit("sort", { prop, order }); }; const clearFilter = (columnKeys) => { store.clearFilter(columnKeys); }; const toggleRowExpansion = (row, expanded) => { store.toggleRowExpansionAdapter(row, expanded); }; return { setCurrentRow, getSelectionRows, toggleRowSelection, clearSelection, clearSort, sort, clearFilter, toggleRowExpansion }; } export { useUtils as default }; //# sourceMappingURL=utils.mjs.map