🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

typeorm-mui-query

Package Overview
Dependencies
Maintainers
0
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typeorm-mui-query

MUI TypeORM QueryBuilder

1.3.1
latest
Source
npm
Version published
Weekly downloads
2
-50%
Maintainers
0
Weekly downloads
 
Created
Source

MUI TypeORM QueryBuilder

If you use TypeORM and MUI Data Grid server-side filter or server-side sorting this project can be helpful.

Install

npm install typeorm-mui-query

Example

Frontend

const [queryOptions, setQueryOptions] = useState({
  filterModel: {
    items: [],
  },
  sortModel: [],
})

const handleSortModelChange: DataGridProProps['onSortModelChange'] = useCallback((sortModel) => {
  setQueryOptions((currentState) => ({ ...currentState, sortModel }))
}, [])

const handleFilterModelChange: DataGridProProps['onFilterModelChange'] = useCallback(
  (filterModel) => {
    setQueryOptions((currentState) => ({ ...currentState, filterModel }))
  },
  []
)

const query = new URLSearchParams({
  ...queryOptions,
  sortModel: JSON.stringify(queryOptions.sortModel),
  filterModel: JSON.stringify(queryOptions.filterModel),
})
const results = await API.get('default', `/example?${query.toString()}`, {})

Backend

import { handleQuery } from 'typeorm-mui-query'

handleQuery({ qb, queryStringParameters })
const results = await qb.getMany()

Keywords

MUI

FAQs

Package last updated on 13 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts