Skip to content

Feature: add client/server search type toggle to dropdown, multiselect and tags input#16856

Merged
johnsoncherian merged 6 commits into
chore/release-3.20.185-ltsfrom
feature/dropdown-server-side-search
Jun 24, 2026
Merged

Feature: add client/server search type toggle to dropdown, multiselect and tags input#16856
johnsoncherian merged 6 commits into
chore/release-3.20.185-ltsfrom
feature/dropdown-server-side-search

Conversation

@nithindavid

@nithindavid nithindavid commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

📝 What this does

Adds a Search type toggle (Client side / Server side) to the Dropdown, Multiselect, and Tags Input widgets so search can be handed to a backend instead of filtering a pre-loaded list. In server mode the widget stops filtering and highlighting options locally, letting backend-filtered results render untouched, while still exposing searchText and firing onSearchTextChanged.

Closes ToolJet/tj-ee#5193

🔀 Changes

  • Added a serverSideSearch client/server toggle to Dropdown and Multiselect (under "Show search in options") and Tags Input (under "Turn on search"), shown only when search is enabled.
  • Skipped client-side option filtering in server mode so all returned options render; Tags also skips its pre-filtered options memo, not just react-select's filter.
  • Skipped match highlighting in server mode on Dropdown and Multiselect (Tags renders plain option text).
  • Mirrored the new property in each server-side widget config so it persists on save.
  • Fixed conditionallyRender being ignored for Dropdown, Multiselect, and Tags in the inspector (the widgets were missing from the allowlist).

🧪 How to test

  • On each widget, turn search off — the Search type toggle is hidden; turn it on — the toggle appears.
  • Set Search type to Client side — search filters (and highlights, where applicable) options as before.
  • Set Search type to Server side — typing renders all options unfiltered with no highlight, and searchText / onSearchTextChanged still update and fire.
  • Wire a query to searchText on onSearchTextChanged and bind its result to the options — confirm results are not re-filtered client-side.

Adds a "Type" toggle (Client side / Server side) under "Show search in
options" in the Dropdown's additional actions. Server mode stops
client-side filtering and highlighting so backend-filtered results pass
through untouched; search text is still exposed and onSearchTextChanged
still fires. Also fixes conditionallyRender being ignored for DropdownV2
in the inspector.

Closes ToolJet/tj-ee#5193

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@netlify

netlify Bot commented Jun 17, 2026

Copy link
Copy Markdown

Deploy Preview for storybook-tooljet failed.

Name Link
🔨 Latest commit a6a96b5
🔍 Latest deploy log https://app.netlify.com/projects/storybook-tooljet/deploys/6a3a1ed854f69b00089c825e

nithindavid and others added 4 commits June 17, 2026 17:09
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… input

Mirrors the dropdown server-side search toggle onto Multiselect and Tags
Input. Server mode short-circuits client-side option filtering (and
highlighting on Multiselect). Tags Input gates on its existing "Turn on
search" toggle since it has no separate search-input toggle. Also adds
both widgets to the inspector conditionallyRender allowlist.

Relates to: ToolJet/tj-ee#5193

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Move the Tags Input search type toggle into the Tags section directly
below "Turn on search" (rendered explicitly there) instead of additional
actions. Harden all serverSideSearch guards to strict `=== true` so a
non-boolean resolved value can never disable client-side filtering.

Relates to: ToolJet/tj-ee#5193

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Tags Input filters options by input text in a useMemo before passing
them to react-select, so gating filterOption alone left server mode
still filtering. Skip the client-side input match in that memo when
server-side search is on.

Relates to: ToolJet/tj-ee#5193

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@nithindavid nithindavid changed the title Feature: add client/server side search type toggle to dropdown Feature: add client/server search type toggle to dropdown, multiselect and tags input Jun 18, 2026
Server-side search renders all options unfiltered, exposing a latent
crash when an option/tag has a numeric (or boolean) value: the
"already exists" check and label filters called .toLowerCase()/.includes()
directly on the raw value, and optional chaining only guarded null.

Coerce with String(... ?? '') in TagsInputMenuList dedup check and in
TagsInput filteredOptions memo + react-select filterOption.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@johnsoncherian johnsoncherian changed the base branch from lts-3.16 to chore/release-3.20.185-lts June 24, 2026 08:33
@johnsoncherian johnsoncherian merged commit 2d9d9ec into chore/release-3.20.185-lts Jun 24, 2026
80 of 84 checks passed
@johnsoncherian johnsoncherian deleted the feature/dropdown-server-side-search branch June 24, 2026 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants