We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug If the name of a columnConfig is set to a string containing special characters, e.g. '/', a lot of UncaughtDOMExceptions are thrown.
To Reproduce See Code to reproduce, the exception will be thrown upon loading the site.
Expected behavior Css rules should be escaped before being applied in DominoStyleSheet.
Code to reproduce
import com.google.gwt.core.client.EntryPoint; import elemental2.dom.Event; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import org.dominokit.domino.ui.cards.Card; import org.dominokit.domino.ui.cards.HeaderAction; import org.dominokit.domino.ui.datatable.ColumnConfig; import org.dominokit.domino.ui.datatable.DataTable; import org.dominokit.domino.ui.datatable.TableConfig; import org.dominokit.domino.ui.datatable.store.LocalListDataStore; import org.dominokit.domino.ui.icons.Icons; import org.dominokit.domino.ui.layout.Layout; import org.dominokit.domino.ui.style.ColorScheme; import org.dominokit.domino.ui.utils.TextNode; public class CodeToReproduce implements EntryPoint { private LocalListDataStore<DataObject> localListDataStore; private DataTable<DataObject> table; private final TableConfig<DataObject> tableConfig = new TableConfig<>(); private final Card card = Card.create(); @Override public void onModuleLoad() { Layout layout = Layout.create("ColumnConfig special characters").show(ColorScheme.AMBER); tableConfig .addColumn(ColumnConfig.<DataObject>create("a/b", "a/b") .setCellRenderer( cell -> TextNode.of(cell.getTableRow().getRecord().getValue("a/b").toString()) )); localListDataStore = new LocalListDataStore<>(); table = new DataTable<>(tableConfig, localListDataStore).noStripes(); List<DataObject> data = new ArrayList<>(); DataObject object = new DataObject() .addDataObject("a/b", (0)); data.add(object); localListDataStore.setData(data); card.addHeaderAction(new HeaderAction(Icons.MDI_ICONS.refresh_mdi()).addClickListener((Event evt) -> { card.getBody().clearElement(); localListDataStore = new LocalListDataStore<>(); table = new DataTable<>(tableConfig, localListDataStore).noStripes(); List<DataObject> data1 = new ArrayList<>(); DataObject object1 = new DataObject() .addDataObject("a/b", (1)); data1.add(object1); localListDataStore.setData(data1); card.appendChild(table); })); card.appendChild(table); layout.getContentPanel().appendChild(card); } private static class DataObject { private final HashMap<String, Object> keyValuePair = new HashMap<>(); public DataObject addDataObject(String key, Object value) { keyValuePair.put(key, value); return this; } public Object getValue(String key) { return keyValuePair.get(key); } } }
The text was updated successfully, but these errors were encountered:
fix #812 ColumnConfig: Uncaught DOMExceptions if the name of ColumnCo…
ef2fd31
…nfig contains special characters, e.g. '/'
8438043
vegegoku
No branches or pull requests
Describe the bug
If the name of a columnConfig is set to a string containing special characters, e.g. '/', a lot of UncaughtDOMExceptions are thrown.
To Reproduce
See Code to reproduce, the exception will be thrown upon loading the site.
Expected behavior
Css rules should be escaped before being applied in DominoStyleSheet.
Code to reproduce
The text was updated successfully, but these errors were encountered: