mirror of
https://github.com/foss42/apidash.git
synced 2025-06-21 14:57:07 +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
|
@override
|
||||||
Widget build(BuildContext context) {
|
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;
|
var rH = ref.read(activeRequestModelProvider)?.requestHeaders;
|
||||||
rows = (rH == null || rH.isEmpty)
|
rows = (rH == null || rH.isEmpty)
|
||||||
? [
|
? [
|
||||||
|
@ -55,9 +55,7 @@ class _HeaderFieldState extends State<HeaderField> {
|
|||||||
suggestionsCallback: headerSuggestionCallback,
|
suggestionsCallback: headerSuggestionCallback,
|
||||||
suggestionsBoxDecoration: suggestionBoxDecorations(context),
|
suggestionsBoxDecoration: suggestionBoxDecorations(context),
|
||||||
textFieldConfiguration: TextFieldConfiguration(
|
textFieldConfiguration: TextFieldConfiguration(
|
||||||
onChanged: (s) {
|
onChanged: widget.onChanged,
|
||||||
widget.onChanged?.call(s);
|
|
||||||
},
|
|
||||||
controller: controller,
|
controller: controller,
|
||||||
style: kCodeStyle.copyWith(
|
style: kCodeStyle.copyWith(
|
||||||
color: colorScheme.onSurface,
|
color: colorScheme.onSurface,
|
||||||
|
Reference in New Issue
Block a user