useDataWithFilter
useDataWithFilter is a thin wrapper around useData kept for backwards compatibility. It accepts the same filter options as useFilter and returns the data from the data object. New code should call useData directly with a filter option.
Example
import { useDataWithFilter } from "@olenbetong/appframe-react";
function MyComponent({ id }) {
let data = useDataWithFilter(dsMyDataObject, id ? `[ID] = ${id}` : false);
return (
<ul>
{data.map((record) => (
<li key={record.PrimKey}>{record.Title}</li>
))}
</ul>
);
}Last updated
Was this helpful?