Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Product Query: rename allowControls to allowedControls #7365

Merged
merged 1 commit into from
Oct 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion assets/js/blocks/product-query/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const DEFAULT_ALLOWED_CONTROLS = [
];

export const QUERY_DEFAULT_ATTRIBUTES: QueryBlockAttributes = {
allowControls: DEFAULT_ALLOWED_CONTROLS,
allowedControls: DEFAULT_ALLOWED_CONTROLS,
displayLayout: {
type: 'flex',
columns: 3,
Expand Down
2 changes: 1 addition & 1 deletion assets/js/blocks/product-query/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export interface ProductQueryAttributes {
}

export interface QueryBlockAttributes {
allowControls?: string[];
allowedControls?: string[];
displayLayout?: {
type: 'flex' | 'list';
columns?: number;
Expand Down
2 changes: 1 addition & 1 deletion assets/js/blocks/product-query/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export function useAllowedControls(
select( WP_BLOCKS_STORE ).getActiveBlockVariation(
'core/query',
attributes
)?.allowControls,
)?.allowedControls,

[ attributes ]
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ if ( isExperimentalBuild() ) {
// https://github.com/WordPress/gutenberg/pull/43632
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
allowControls: DEFAULT_ALLOWED_CONTROLS,
allowedControls: DEFAULT_ALLOWED_CONTROLS,
innerBlocks: INNER_BLOCKS_TEMPLATE,
scope: [ 'block', 'inserter' ],
} );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ if ( isExperimentalBuild() ) {
// https://github.com/WordPress/gutenberg/pull/43632
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
allowControls: ArrayXOR(
allowedControls: ArrayXOR(
DEFAULT_CORE_ALLOWED_CONTROLS,
DISABLED_INSPECTOR_CONTROLS
),
Expand Down