Skip to content

Commit 1b8d8f2

Browse files
committed
feat: remove checkbox for option, leave subject look up as own button
1 parent 20dfa02 commit 1b8d8f2

File tree

1 file changed

+16
-33
lines changed

1 file changed

+16
-33
lines changed

apps/web/src/routes/_app/datahub/index.tsx

Lines changed: 16 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -180,33 +180,29 @@ const RouteComponent = () => {
180180
</PageHeader>
181181
<div className="flex grow flex-col">
182182
<div className="mb-3 flex flex-col justify-between gap-3 lg:flex-row">
183+
<SearchBar
184+
className="[&>input]:text-foreground [&>input]:placeholder-foreground grow"
185+
data-testid="datahub-subject-lookup-search"
186+
id="subject-lookup-search-bar"
187+
placeholder={t({
188+
en: 'Click to Search',
189+
fr: 'Cliquer pour rechercher'
190+
})}
191+
readOnly={false}
192+
/>
183193
<Dialog open={isLookupOpen} onOpenChange={setIsLookupOpen}>
184-
{isLookUpSearch ? (
185-
<Dialog.Trigger className="grow">
186-
<Button
187-
className="[&>input]:text-foreground [&>input]:placeholder-foreground grow"
188-
data-testid="datahub-subject-lookup-search"
189-
id="subject-lookup-search-bar"
190-
>
191-
{t({
192-
en: 'Click to Search',
193-
fr: 'Cliquer pour rechercher'
194-
})}
195-
</Button>
196-
</Dialog.Trigger>
197-
) : (
198-
<SearchBar
194+
<Dialog.Trigger>
195+
<Button
199196
className="[&>input]:text-foreground [&>input]:placeholder-foreground grow"
200197
data-testid="datahub-subject-lookup-search"
201198
id="subject-lookup-search-bar"
202-
placeholder={t({
199+
>
200+
{t({
203201
en: 'Click to Search',
204202
fr: 'Cliquer pour rechercher'
205203
})}
206-
readOnly={false}
207-
/>
208-
)}
209-
204+
</Button>
205+
</Dialog.Trigger>
210206
<Dialog.Content data-spotlight-type="subject-lookup-modal" data-testid="datahub-subject-lookup-dialog">
211207
<Dialog.Header>
212208
<Dialog.Title>{t('datahub.index.lookup.title')}</Dialog.Title>
@@ -224,19 +220,6 @@ const RouteComponent = () => {
224220
onSelection={handleExportSelection}
225221
/>
226222
</div>
227-
<div className="flex min-w-60 gap-2 lg:shrink">
228-
<Checkbox
229-
id="Datahub table search mode"
230-
onCheckedChange={() => setLookUpSearch(!isLookUpSearch)}
231-
></Checkbox>
232-
<Label>
233-
{' '}
234-
{t({
235-
en: 'Enable Datahub Filter Mode',
236-
fr: 'Activer le mode de filtrage'
237-
})}
238-
</Label>
239-
</div>
240223
<div className="flex min-w-60 gap-2 lg:shrink">
241224
<Button label="Reset Datahub" onClick={() => void setTableData(data)} />
242225
</div>

0 commit comments

Comments
 (0)