sap.ui.table.Table scrollbar does not reach bottom - sapui5

I've been working with sap.ui.table.Table for a while now but the scrollbar never reached the bottom. Fortunately I can see the last rows but it's still weird to not work as the samples...
Tried to study the samples which do not have the same problem and also the doc but nothing...
I do not have weird css on my table or components which shouldn't be used (table in the picture).
Version I'm using is 1.97
Sorry for the picture in the link but I'm still not allowed to insert it directly.
var table = new sap.ui.table.Table({
extension: new sap.m.Toolbar({
content:[
new sap.m.Button({
icon: "sap-icon://add",
text: "New"
}),
new sap.m.Button({
icon: "sap-icon://delete",
text: "Delete"
})
],
}),
footer: new sap.m.Toolbar({
design: sap.m.ToolbarDesign.Solid,
content: [
new sap.m.ToolbarSpacer(),
new sap.m.Text({
text:"entries"
})
]
}),
rows: {
path: "oModel>/users/result"
},
selectionMode: sap.ui.table.SelectionMode.Single,
visibleRowCount: 8,
visibleRowCountMode: "Fixed",
//rowHeight: 20})
table

Have you checked the guidelines? https://experience.sap.com/fiori-design-web/grid-table/#behavior-and-interaction
To prevent adverse side effects when scrolling vertically, all line items must have the same height (sap.ui.table.Table, property: rowHeight).
So maybe your rows don't match the rowHeight property. You can try to adjust it.
Also please make sure to only use supported controls inside the cells as listed here https://experience.sap.com/fiori-design-web/grid-table/#Table%28ALV%29-CellContent

Related

Flutter group_button package throwing errors when inserting parameters and single-select

New user to flutter (25 years of procedural coding, going a bit insane)
When using the simple logic on pub.dev it works ok:
GroupButton(
isRadio: false,
buttons: ["Male", "Female", "Other"],
),
But as soon as I insert any of the options, it throws an error (the named parameter isn't defined):
GroupButton(
isRadio: false,
spacing: 10,
buttons: ["Male", "Female", "Other"],
),
What's the simplest way to put a border around the selected object and reset the others?
Help much appreciated (including a better method, etc.),
David

Expand flutter datatable row on click

I'm currently using a DataTable to display a summary of some data like this
DataTable(
showCheckboxColumn: false,
columns: columnNames,
rows: state.alerts.alerts
.map(
(alert) => DataRow(
cells: [
const DataCell(Icon(
Icons.circle,
color: Colors.amber,
)),
const DataCell(Text("Something"),),
const DataCell(Text("Something")),
const DataCell(Text("TO DO")),
DataCell(Text(DateTime.fromMillisecondsSinceEpoch(alert.time.toInt(), isUtc: true).toString())),
],
onSelectChanged: (bool? selected) {
if (selected == null || !selected) return;
// Show details
},
),
)
.toList())
Which looks something like this
I would like to have it so when a user selects a row, that row expands vertically and shows additioal information whilst still part of the table (i.e. all rows below the selected row should be pushed down). The functionality I'd like to achieve is exactly what https://api.flutter.dev/flutter/material/ExpansionPanelList-class.html is intended for however using that would mean I loose access to the advantages of using a table (automated column sizing etc).
Is there a way I can create a custom table row without copying the entire DataTable source out and modifying how rows are generated?
^EDIT: After looking into the source of DataTable this doesn't look like a viable option, DataTable ultimatly mashes everything into a Table which enforces column widths. The only work around I can think of would be creating a new table for each row so a non tabled widget can be inserted in between but this would likely break a lot of stuff and be horrible for performance.
Expandable row in table with flutter- is it possible? looks like a step in the right direction however much like the OP, I can't see a way to apply Expandable to a TableRow rather than a TableCell
Thanks

AG Grid clip long text in cell and show all on click

I have a tall row like this
and I managed to display It like this
I also want to display it like on the first picture after the dots click.
To achieve it I made a custom cell renderer it's changing the inner HTML content of a cell. And my problem is that after change content to long row has the same height so I cant see full text.
Is there any method to rerender rows or the whole table.
you need to set these two property on the column which is getting expanded.
wrapText: true,
autoHeight: true,
if this behavior is needed on all column or you are not sure better define these under
defaultColDef: {
....
flex: 1,
minWidth: 110,
editable: true,
resizable: true,
wrapText: true,
autoHeight: true,
...
},
then call resetRowHeights(); on cellValueChanged event.
onCellValueChanged : function(params){ params.api.resetRowHeights();}

flutter typeahead suggestionbox doesn't hide

my problem:
The suggestionbox doesn't hide, except i choose one suggestion. hideSuggestionsOnKeyboardHide changes absolutely nothing...
I saw that others solved this problem with another package named keyboardvisibility.
But for me this is not a solution, beause i don't want the suggestionbox to disappear as soon as the keyboard disappears, I want the suggestionbox to disappear as soon as I tap somewhere outside the suggestionbox. Hope someone can help.
Here my code if it helps:
TypeAheadField(
hideOnEmpty: true,
hideOnError: true,
suggestionsBoxController: _suggestionsBoxController,
textFieldConfiguration: TextFieldConfiguration(
controller: typeAheadControllerA,
decoration: const InputDecoration(
hintText: 'Artikelnummer',
icon: const Icon(
Icons.business_center,
color: Colors.grey,
))),
suggestionsCallback: (pattern) {
return autoA
.where((autoA) =>
autoA.toLowerCase().contains(pattern.toLowerCase()))
.toList();
},
itemBuilder: (context, suggestion) {
return ListTile(
title: Text(suggestion),
);
},
transitionBuilder: (context, suggestionsBox, controller) {
return suggestionsBox;
},
onSuggestionSelected: (suggestion) {
typeAheadControllerA.text = suggestion;
},
)
Another minor problem/question:
How can i change the width of the suggestionbox / adapt to the width of the input field?
When I set the icon, logically the width of the input field decreased but the width of the suggestion box did not adapt to the width of the input field. I tried with suggestionsBoxDecoration offsetX. With offsetX I can move the box to the right, but the box keeps its width and therefore goes too far to the right but then i tried with wrapping the typeaheadfield in a padding widget or sizedbox but nothing works. If nobody knows how to solve this, I will probably remove the icons...
Thanks for help :)
You just use the keyboard "done" on iOS physical devices (I haven't tested it on Android yet - assuming there is something similar?), or click another field if there is one. The iOS simulator just doesn't bring up the keyboard when typing so it annoyingly seems like it can't be hidden without selecting a suggestion.
Tapping outside the field but not on another field doesn't unfocus normal TextFields either.
Use this metod: hideSuggestionsOnKeyboardHide: true,
You should wrap your scaffold with GestureDetector and with the property onTap() you call _suggestionBoxController.close();. Another thing if it does not work for you maybe you have a lot of code that is executed in one single file a simple refactoring can be your solution and set hideSuggestionsOnKeyboardHide : true (it was my case). For the width of the box suggestionBoxController.resize()

Flutter collapsed ExpansionTile not saving form data?

I am working on flutter expansionTile and added different fields inside that. If I expand the expansionTile and hit submit, The form fields are submitted which are inside expansionTile. But If I collapse it and then hit submit, then only those fields values are displayed that are not collapsed.
Well for the reference here is a piece of code.
ExpansionTile(
backgroundColor: Theme.of(context)
.accentColor
.withOpacity(0.050),
title: Text(item.formName),
children: <Widget>[
FormBuilderCheckboxList(
decoration:
InputDecoration(labelText: item.formName),
attribute: item.uniqueId,
initialValue: [],
// initialValue: item?.answerMultiple.map( (ans) =>ans )??[],
options: item.formFieldOptions
.map((opt) => FormBuilderFieldOption(
value: opt.optName))
.toList(),
),
],
),
So This if I submit this checkbox field expanded then it shows the values on my DEBUG CONSOLE and if I close the ExpansionTile then its not show me any thing. Below is the output when I have expanded the Tile.
flutter: {uid_201994077147: Yes, uid_201985062316: [• Sodium Chloride – (Road Salt, Table Salt) , • Calcium Chloride , • Ammonium Nitrate , Ammonium Sulfate , Sand]}
Thank you all in advance.
Not sure if you still need this but I experienced the same issue and it seems that default behavior of ExpensionTile is removing all of its children when collapsed. There is a PR in flutter repo waiting to be merged. Until then we need to find a workaround for that. It might be keeping the state whenever value changes or when collapse changes and reinitializing its value when collapse changed again.