feat: add URL deep-linking for DataGrids
- 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>
This commit is contained in:
co-authored by
Claude Opus 4.5
parent
a6c51f757a
commit
c494ace5d8
@@ -0,0 +1,13 @@
|
||||
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());
|
||||
}
|
||||
Reference in New Issue
Block a user