mirror of
https://github.com/foss42/apidash.git
synced 2025-06-02 16:02:12 +08:00
fix activeId provider
- read -> watch - added length back
This commit is contained in:
@ -33,7 +33,9 @@ class EditRequestHeadersState extends ConsumerState<EditRequestHeaders> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final activeId = ref.read(activeIdStateProvider);
|
||||
final activeId = ref.watch(activeIdStateProvider);
|
||||
final length = ref.watch(activeRequestModelProvider
|
||||
.select((value) => value?.requestHeaders?.length));
|
||||
var rH = ref.read(activeRequestModelProvider)?.requestHeaders;
|
||||
rows = (rH == null || rH.isEmpty)
|
||||
? [
|
||||
|
@ -55,9 +55,7 @@ class _HeaderFieldState extends State<HeaderField> {
|
||||
suggestionsCallback: headerSuggestionCallback,
|
||||
suggestionsBoxDecoration: suggestionBoxDecorations(context),
|
||||
textFieldConfiguration: TextFieldConfiguration(
|
||||
onChanged: (s) {
|
||||
widget.onChanged?.call(s);
|
||||
},
|
||||
onChanged: widget.onChanged,
|
||||
controller: controller,
|
||||
style: kCodeStyle.copyWith(
|
||||
color: colorScheme.onSurface,
|
||||
|
Reference in New Issue
Block a user