Skip to content

Commit

Permalink
feat: add support for setting a custom data provider to the virtual list
Browse files Browse the repository at this point in the history
  • Loading branch information
mlopezFC committed Sep 13, 2024
1 parent 2ff035e commit 8dad95e
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import com.vaadin.flow.component.messages.MessageInput.SubmitEvent;
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
import com.vaadin.flow.component.virtuallist.VirtualList;
import com.vaadin.flow.data.provider.DataProvider;
import com.vaadin.flow.data.renderer.ComponentRenderer;
import com.vaadin.flow.dom.DomEvent;
import com.vaadin.flow.shared.Registration;
Expand Down Expand Up @@ -104,6 +105,14 @@ private void handleClick(DomEvent event) {
}
});
}

/**
* Sets the data provider of the internal VirtualList
* @param dataProvider
*/
public void setDataProvider(DataProvider<Message, ?> dataProvider) {
content.setDataProvider(dataProvider);
}

/**
* Uses the provided string as the text shown over the message input to indicate that someone is typing
Expand Down

0 comments on commit 8dad95e

Please sign in to comment.