Skip to content

Commit

Permalink
[CPT-1479] Enable select clear button for the qb
Browse files Browse the repository at this point in the history
  • Loading branch information
angelinastavniiciuc committed Jan 10, 2024
1 parent 7869a22 commit d9c4e10
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/few-buckets-knock.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@toptal/picasso-query-builder': minor
---

- add `enableReset` property for `multiselect` filter type
2 changes: 1 addition & 1 deletion packages/picasso-query-builder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"url": "https://github.com/toptal/picasso/issues"
},
"peerDependencies": {
"@toptal/picasso": ">=38.0.0",
"@toptal/picasso": "^42.0.0",
"react": ">=16.12.0 < 19.0.0",
"react-dom": ">=16.12.0 < 19.0.0",
"typescript": "~4.7.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export const MultiSelect = ({
value={values}
status={hasError ? 'error' : undefined}
data-testid={valueEditorTestId}
enableReset={fieldData?.enableReset}
enableResetSearch={fieldData?.enableResetSearch}
/>
</Container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ const fields: Field[] = [
label: 'Also plays',
valueEditorType: 'multiselect',
enableResetSearch: true,
enableReset: true,
values: musicalInstruments,
defaultValue: 'More cowbell',
},
Expand Down
1 change: 1 addition & 0 deletions packages/picasso-query-builder/src/types/query-builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ interface MultiSelectField
* Allow search input reset
*/
enableResetSearch?: boolean
enableReset?: boolean
}

interface AutoCompleteField
Expand Down

0 comments on commit d9c4e10

Please sign in to comment.