mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
fix: calendar event card not displaying as intended (#3731)
This commit is contained in:
parent
e565d0ee32
commit
1793a28cbc
@ -26,7 +26,12 @@ class CalendarEventEditorBloc
|
|||||||
final cells = rowController
|
final cells = rowController
|
||||||
.loadData()
|
.loadData()
|
||||||
.values
|
.values
|
||||||
.where((cellContext) => cellContext.isVisible())
|
.where(
|
||||||
|
(cellContext) =>
|
||||||
|
cellContext.isVisible() ||
|
||||||
|
cellContext.fieldId == layoutSettings.fieldId ||
|
||||||
|
cellContext.fieldInfo.isPrimary,
|
||||||
|
)
|
||||||
.toList();
|
.toList();
|
||||||
if (!isClosed) {
|
if (!isClosed) {
|
||||||
add(
|
add(
|
||||||
@ -50,7 +55,12 @@ class CalendarEventEditorBloc
|
|||||||
onRowChanged: (cells, reason) {
|
onRowChanged: (cells, reason) {
|
||||||
if (!isClosed) {
|
if (!isClosed) {
|
||||||
final cellData = cells.values
|
final cellData = cells.values
|
||||||
.where((cellContext) => cellContext.isVisible())
|
.where(
|
||||||
|
(cellContext) =>
|
||||||
|
cellContext.isVisible() ||
|
||||||
|
cellContext.fieldId == layoutSettings.fieldId ||
|
||||||
|
cellContext.fieldInfo.isPrimary,
|
||||||
|
)
|
||||||
.toList();
|
.toList();
|
||||||
add(
|
add(
|
||||||
CalendarEventEditorEvent.didReceiveCellDatas(cellData),
|
CalendarEventEditorEvent.didReceiveCellDatas(cellData),
|
||||||
|
@ -126,9 +126,11 @@ class EventPropertyList extends StatelessWidget {
|
|||||||
state.cells.firstWhereOrNull((cell) => cell.fieldInfo.isPrimary);
|
state.cells.firstWhereOrNull((cell) => cell.fieldInfo.isPrimary);
|
||||||
final dateFieldIndex =
|
final dateFieldIndex =
|
||||||
reorderedList.indexWhere((cell) => cell.fieldId == dateFieldId);
|
reorderedList.indexWhere((cell) => cell.fieldId == dateFieldId);
|
||||||
|
|
||||||
if (primaryCellContext == null || dateFieldIndex == -1) {
|
if (primaryCellContext == null || dateFieldIndex == -1) {
|
||||||
return const SizedBox.shrink();
|
return const SizedBox.shrink();
|
||||||
}
|
}
|
||||||
|
|
||||||
reorderedList.insert(0, reorderedList.removeAt(dateFieldIndex));
|
reorderedList.insert(0, reorderedList.removeAt(dateFieldIndex));
|
||||||
|
|
||||||
final children = <Widget>[
|
final children = <Widget>[
|
||||||
|
Loading…
x
Reference in New Issue
Block a user