working in RTL languages like Hebrew and Arabic
how can i configure RTL ?
This was my code:
Directionality( textDirection: TextDirection.rtl, child: PlutoGrid(...
And the strings are in Hebrew
when i wrap with Directionality => resize of the column not working (will be reverse ) and if you move by keyboard inside the raw it will be reverse also the header of column and header of filter option have issues
its a column
PlutoColumn(
enableContextMenu: true,
renderer: (c) {
return Align(
alignment: Alignment.center,
child: Text(
c.cell.value.toString(),
),
);
},
hide: false,
enableHideColumnMenuItem: false,
enableRowChecked: false,
enableColumnDrag: false,
enableDropToResize: false,
enableEditingMode: false,
enableRowDrag: false,
enableSorting: false,title: '#', field: 'text_index', type: PlutoColumnType.text(),
textAlign: PlutoColumnTextAlign.left),
and its Scaffold Widget
@override
Widget build(BuildContext context) {
return Scaffold(
body: Container(
alignment: Alignment.center,
padding: const EdgeInsets.all(30),
child: Directionality(
textDirection: TextDirection.rtl,
child: PlutoGrid(
columns: columns,
rows: _dataSource.map<PlutoRow>((e) => buildPlutoRow(e)).toList(),
configuration: PlutoGridConfiguration(
/// If columnFilterConfig is no set, the default setting is applied.
///
/// Return the value returned by resolveDefaultColumnFilter through the resolver function.
/// Prevents errors returning filters that are not in the filters list.
columnFilterConfig: PlutoGridColumnFilterConfig(
filters: const [
...FilterHelper.defaultFilters,
// custom filter
ClassYouImplemented(),
],
resolveDefaultColumnFilter: (column, resolver) {
if (column.field == 'text') {
return resolver<PlutoFilterTypeContains>() as PlutoFilterType;
} else if (column.field == 'number') {
return resolver<PlutoFilterTypeGreaterThan>()
as PlutoFilterType;
} else if (column.field == 'date') {
return resolver<PlutoFilterTypeLessThan>() as PlutoFilterType;
} else if (column.field == 'select') {
return resolver<ClassYouImplemented>() as PlutoFilterType;
}
return resolver<PlutoFilterTypeContains>() as PlutoFilterType;
},
),
iconSize: 30,
iconColor: Colors.blueGrey,
enableColumnBorder: true,
rowHeight: 30,
),
createFooter: (stateManager) {
stateManager.setPageSize(30, notify: false); // default 40
return PlutoPagination(stateManager);
},
mode: PlutoGridMode.select,
onRowChecked: handleOnRowChecked,
onChanged: (PlutoGridOnChangedEvent event) {
print(event);
},
onLoaded: (PlutoGridOnLoadedEvent event) {
columns.map((e) => event.stateManager.autoFitColumn(context, e));
event.stateManager.setShowColumnFilter(true);
event.stateManager.setSelectingMode(PlutoGridSelectingMode.horizontal);
// event.stateManager.cellPositionToMove(PlutoGridCellPosition(), PlutoMoveDirection.left);
//event.stateManager.showSetColumnsPopup(context);
stateManager = event.stateManager;
},
),
),
),
);
}
I agree - this is not enough - a support for RTL languages is need with something like this in the configuration:
gridDirection: PlutoGridDirection.rtl
@ylahav @devahmedghanim
I'm sharing a link to the RTL feature so you can preview it. Please check the link to see if there are any problems. If there are no problems, I will distribute it.
https://weblaze.dev/pluto_grid/build/pre/web/#feature/rtl
menu of grid must be from right to left also . if you move by keyboard inside the raw it will be reverse . when you select set column the design of popup not good must be expanded to be better . design of date picker It is very old, I think it is from the days of the Romans . and if you can make filter to date .. > range from date to date . its also so important if you can make function to rebuild grid . (refresh) its also so important if you can make function to rebuild row only. (refresh) in sync fusion if you change any thing in data source the grid change in same time without any rebuild i think they make a grid directly from the list of data source
@bosskmk can't we have this feature yet?
- is there a way to make the column width responsive (full inside the whole grid)
@hamzaj9
I am preparing to add column width adjustment to fit the entire grid width in version 4.1.
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.