Skip to content

Conversation

@dirk4000
Copy link

@dirk4000 dirk4000 commented Nov 23, 2025

This pull request introduces initial regex-based search functionality and marker highlighting for W2UI grids.

Regex search makes it possible to match complex patterns across all grid columns,
and marker highlighting provides visual feedback for matched substrings.

Features

  • Added regex evaluation to the search logic in w2utils.
  • Enabled multi-column regex search inside W2UI grids.
  • Implemented marker highlighting for matched text fragments.
  • Added new demo pages:
    • demos/regex-demo.html
    • demos/regex-grid-demo.html
  • Updated build files:
    • dist/w2ui.js
    • dist/w2ui.es6.js
    • (including minified versions)
  • Updated package.json and gulpfile.js to fix security vulnerabilities identified by npm audit (outdated dependencies updated to safe versions).

Motivation

W2UI’s native search functionality is limited to simple substring matching.
With regex support, users gain significantly more powerful search capabilities,
especially for complex datasets. The added marker highlighting improves clarity
and user experience by visually showing where matches occur.

Notes for Reviewers

  • No breaking API changes.
  • dist/ files are included so the feature works without an additional build step,
    but core logic can be reviewed in the files under src/.
  • The feature is fully backward-compatible: if no regex is used, normal search behavior remains unchanged.
  • Additional test cases or documentation updates can be added upon request.

Status

Feature is complete and ready for review. Feedback welcome.

 Add regex search operator to w2ui

Extends w2ui with full regex support for searches in grids. Includes intelligent DOM traversal for highlighting and graceful fallback for invalid patterns.
…I demo

- Implement regex-based search for all grid columns
- Add marker highlighting for matched substrings
- Introduce validation and safe handling for invalid regex patterns
- Integrate search+highlight logic into existing grid reload lifecycle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant