Skip to content
Draft
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
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,22 @@ describe.each([false, true])('token editor, expandToViewport=%s', expandToViewpo
).toEqual(['=Equals', '!=Does not equal', ':Contains', '!:Does not contain']);
});

test('enables client-side filtering on property options', () => {
renderComponent({
query: { tokens: [{ propertyKey: 'string', value: 'first', operator: ':' }], operation: 'or' },
});
const editor = openEditor(0, { expandToViewport });
act(() => editor.propertySelect().openDropdown());
act(() => editor.propertySelect().findFilteringInput()!.setInputValue('str'));
expect(
editor
.propertySelect()
.findDropdown()
.findOptions()
.map(optionWrapper => optionWrapper.getElement().textContent)
).toEqual(['string', 'string-other', 'string!=']);
});

test('preserves fields, when one is edited', () => {
renderComponent({
disableFreeTextFiltering: true,
Expand Down
1 change: 1 addition & 0 deletions src/property-filter/token-editor-inputs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export function PropertyInput({
}
return (
<InternalSelect
filteringType="auto"
options={propertyOptions}
selectedOption={
property
Expand Down
Loading