(core) Implementing search on raw data view

Summary:
Search now works on Raw Data Page.
- Search bar option 'Search on all pages' will change to 'Search on all tables' when on the Raw data page, and will allow searching through all tables.
- Little CSS adjustment for an overlay on Raw page (removes z-index as it is not needed, and conflicts with searchbar).
- Search bar option ('search on all') gets white background, little padding, and is moved 2 pixels up, this is needed for Raw page.

Test Plan: new and updated tests

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D3376
This commit is contained in:
Jarosław Sadziński
2022-04-13 19:26:59 +02:00
parent 007a862333
commit dea1a8ba1b
6 changed files with 234 additions and 46 deletions

View File

@@ -109,8 +109,12 @@ const cssLabel = styled('span', `
const cssOptions = styled('div', `
position: absolute;
right: 0;
top: 48px;
top: 46px;
z-index: 1;
background: white;
padding: 2px 4px;
overflow: hidden;
white-space: nowrap;
`);
const cssShortcut = styled('span', `
@@ -202,7 +206,7 @@ export function searchBar(model: SearchModel, testId: TestId = noTestId) {
testId('close'),
dom.on('click', () => toggleMenu(false))),
cssOptions(
labeledSquareCheckbox(model.multiPage, 'Search all pages'),
labeledSquareCheckbox(model.multiPage, dom.text(model.allLabel)),
dom.on('mouseenter', () => keepExpanded = true),
dom.on('mouseleave', () => keepExpanded = false),
testId('option-all-pages'),