Snippets

Edwin Marshall yoeqo: Untitled snippet

Created by Edwin Marshall
// I've ellided other fields so that we can focus on the problem.
const someTableProps = {
    "editing": true,
    "columns": [
        {
            "name": "BDAY",
            "label": "Birthday",
            "component": {
                "name": "DatePickerInput",
                "props": {
                    "editing": true,
                    "inputFormatters": {
                        "name": "date",
                        "format": "M/D/Y"
                    }
                }
            }
        }
    ]
}

// A similarly configured data table that simply uses formatters instead of a dynamic component
const someOtherTableProps = {
    "editing": true,
    "columns": [
        {
            "name": "ANV",
            "label": "Anniversary",
            "formatters": [
                {
                    "name": "date",
                    "format": "M/D/Y"
                }
            ]
        }
    ]
};
// This is technically less typing, but I'm concerned that it's too magical
const someTableProps = {
    "editing": true
    "columns": [
        {
            "name": "BDAY",
            "label": "Birthday",
            "formatters": [
                {
                    "name": "date",
                    "format": "M/D/Y"
                }
            ],
            "component": {
                "name": "DatePickerInput"
            }
        }
    ]
}

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.