-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Open
Labels
[Feature] DataViewsWork surrounding upgrading and evolving views in the site editor and beyondWork surrounding upgrading and evolving views in the site editor and beyond[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
User-input filters, like the ones provided by text
or integer
by default, need to provide an item-like object to the underlying Edit function they use for the filters.
In pseudo-code, it's something like this:
function InputWidget( {
filter,
view,
onChangeViews,
fields
} ){
const field = findField( ... );
const filter = findFilter( ... );
const data = {
[ field.id ] = filter.value, // THE ISSUE
};
return (
<Edit
data={data}
field={field}
onChange={onChange}
);
}
The issue here is that the data for the field is not necessarily mapped to the field.id, it can live anywhere in the item object — for example, title can come from data.title.raw
, that's why we have the getValue
function.
We need to have a way to build a data item based on some data (filter values).
Metadata
Metadata
Assignees
Labels
[Feature] DataViewsWork surrounding upgrading and evolving views in the site editor and beyondWork surrounding upgrading and evolving views in the site editor and beyond[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended