
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
@react-querybuilder/fluent
Advanced tools
Official react-querybuilder components for Fluent UI.
To see them in action, check out the react-querybuilder
demo or load the example in CodeSandbox.
npm i react-querybuilder @react-querybuilder/fluent @fluentui/react-components @fluentui/react-icons-mdl2
# OR yarn add / pnpm add / bun add
To render Fluent UI-compatible components in the query builder, wrap the <QueryBuilder />
element in <QueryBuilderFluent />
.
import { FluentProvider, webLightTheme } from '@fluentui/react-components';
import { QueryBuilderFluent } from '@react-querybuilder/fluent';
import { QueryBuilder, RuleGroupType } from 'react-querybuilder';
const fields = [
{ name: 'firstName', label: 'First Name' },
{ name: 'lastName', label: 'Last Name' },
];
const App = () => {
const [query, setQuery] = useState<RuleGroupType>({ combinator: 'and', rules: [] });
return (
<FluentProvider theme={webLightTheme}>
<QueryBuilderFluent>
<QueryBuilder fields={fields} query={query} onQueryChange={setQuery} />
</QueryBuilderFluent>
</FluentProvider>
);
};
fluentControlElements
which can be assigned directly to the controlElements
prop on <QueryBuilder />
(and also exports each component individually), but wrapping <QueryBuilder />
in <QueryBuilderFluent />
is the recommended method.[v7.1.0] - 2024-04-01
useQueryBuilderSelector
, props.schema.getQuery()
, and props.schema.dispatchQuery()
), the hooks useQueryBuilderDispatch
and useQueryBuilderStore
are no longer exported.controlClassnames
properties. These classnames augment—rather than replace—the classnames defined for specific controls.
actionElement
: Applied to all action elements like addRuleAction
, addGroupAction
, etc.valueSelector
: Applied to all selection elements like combinatorSelector
, fieldSelector
, etc.numberedParams
option for formatQuery
. When the format is "parameterized"
, parameter placeholders within the generated SQL string will begin with the configured paramPrefix
(default ":") followed by a numbered index beginning with 1
instead of using "?" as the placeholder for all parameters. This option was added primarily to reduce the code necessary for generating PostgreSQL-compatible SQL.
formatQuery
now passes a third parameter to custom ruleProcessor
functions when the format is "parameterized" or "parameterized_named". Currently the parameter is an object with a single property, processedParams
, which represents the current state of the params
array (for the "parameterized" format) or object (for the "parameterized_named" format) at the point the rule processor is invoked during query processing. The default ruleProcessor
for the parameterized formats uses this parameter when the numberedParams
option is true
.generateID
when crypto.randomUUID
is not available. This led to performance improvements in initial <QueryBuilder />
rendering and query update functions.FAQs
Custom Fluent UI components for react-querybuilder
The npm package @react-querybuilder/fluent receives a total of 43 weekly downloads. As such, @react-querybuilder/fluent popularity was classified as not popular.
We found that @react-querybuilder/fluent demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.