- Add PageUrlState utility for URL ↔ state serialization - Add column `id` field for unique column identification in URLs - Update idSelector to return String for URL compatibility - All DataGrid pages now support URL params: search, sort, order, id - Browser URL updates via replaceState (no GoRouter rebuilds) - Add FilterPanelSemantics for filter panel semantic IDs - Add TESTING.md documentation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
14 lines
529 B
Dart
14 lines
529 B
Dart
import 'package:web/web.dart' as web;
|
|
|
|
/// Updates browser URL with query parameters without triggering navigation.
|
|
///
|
|
/// Uses browser's replaceState API to update the URL bar for bookmarking
|
|
/// without causing Flutter/GoRouter to rebuild the page.
|
|
void updateBrowserUrlParams(Map<String, String> params) {
|
|
final currentUri = Uri.parse(web.window.location.href);
|
|
final newUri = currentUri.replace(
|
|
queryParameters: params.isEmpty ? null : params,
|
|
);
|
|
web.window.history.replaceState(null, '', newUri.toString());
|
|
}
|