Skip to content

Change filter value before query #2946

Answered by dj-fiorex
dj-fiorex asked this question in Q&A
Discussion options

You must be logged in to vote

Oh yes, i will try to explain better
This is my two table:
OPERATOR

id name surname

OPERATIONS

id name operatorId

This is the list component of the resource OPERATION

export const OperationList: React.FC = () => {
    const { dataGridProps } = useDataGrid<IOperation>();
   
    const operatorIds = dataGridProps.rows.map((item) => item.operatorId);
    const { data: operatorsData, isLoading: operatorsIsLoading } =
     useMany<IOperator>({
      resource: "operators",
      ids: operatorIds,
      queryOptions: {
       enabled: operatorIds.length > 0,
      },
     });
   
   
    const columns = React.useMemo<GridColumns<IOperation>>(
     () => [
      { field: "id", headerName

Replies: 2 comments 10 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
10 replies
@salihozdemir
Comment options

@dj-fiorex
Comment options

@omeraplak
Comment options

@salihozdemir
Comment options

@dj-fiorex
Comment options

Answer selected by omeraplak
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants