Skip to content

Commit

Permalink
Restrict filters to images only
Browse files Browse the repository at this point in the history
  • Loading branch information
Satya Deep Maheshwari committed Aug 24, 2023
1 parent aa04451 commit 7b54437
Showing 1 changed file with 51 additions and 1 deletion.
52 changes: 51 additions & 1 deletion blocks/aem-asset-selector/aem-asset-selector-util.js
Original file line number Diff line number Diff line change
Expand Up @@ -375,9 +375,59 @@ export async function renderAssetSelectorWithImsFlow(cfg) {
handleAssetSelection: (e) => handleAssetSelection(e, cfg),
env: cfg.environment ? cfg.environment.toUpperCase() : 'PROD',
apiKey: API_KEY,
hideTreeNav: true,
hideTreeNav: false,
runningInUnifiedShell: false,
noWrap: true,
filterSchema: [
{
header: 'File Type',
groupKey: 'TopGroup',
fields: [
{
element: 'checkbox',
name: 'type',
defaultValue: ['image/*'],
readOnly: true,
options: [
{
label: 'Images',
value: 'image/*',
},
],
},
],
},
{
fields:
[
{
element: 'checkbox',
name: 'type',
options: [
{
label: 'JPG',
value: 'image/jpeg',
},
{
label: 'PNG',
value: 'image/png',
},
{
label: 'TIFF',
value: 'image/tiff',
},
{
label: 'GIF',
value: 'image/gif',
},
],
columns: 2,
},
],
header: 'Mime Types',
groupKey: 'MimeTypeGroup',
},
],
};

if (cfg['repository-id']) {
Expand Down

0 comments on commit 7b54437

Please sign in to comment.