mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
fix: make grid with view_id
This commit is contained in:
@ -241,7 +241,7 @@ pub trait ViewDataProcessor {
|
||||
|
||||
fn delta_str(&self, view_id: &str) -> FutureResult<String, FlowyError>;
|
||||
|
||||
fn default_view_data(&self) -> String;
|
||||
fn default_view_data(&self, view_id: &str) -> String;
|
||||
|
||||
fn data_type(&self) -> ViewDataType;
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ impl ViewController {
|
||||
pub(crate) async fn create_view_from_params(&self, mut params: CreateViewParams) -> Result<View, FlowyError> {
|
||||
let processor = self.get_data_processor(¶ms.data_type)?;
|
||||
let content = if params.data.is_empty() {
|
||||
let default_view_data = processor.default_view_data();
|
||||
let default_view_data = processor.default_view_data(¶ms.view_id);
|
||||
params.data = default_view_data.clone();
|
||||
default_view_data
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user