adds validation for fields.
* renames RoomTooltip to be a generic Tooltip (which it is) * hooks it into Field to show validation results * adds onValidate to Field to let Field instances call an arbitrary validation function Rebased from @ara4n's https://github.com/matrix-org/matrix-react-sdk/pull/2550 by @jryans. Subsequent commits revise and adapt this work.
This commit is contained in:
parent
a5c1d6733f
commit
40f16fa310
15 changed files with 154 additions and 47 deletions
|
@ -145,8 +145,8 @@ module.exports = React.createClass({
|
|||
// Get the label/tooltip to show
|
||||
getLabel: function(label, show) {
|
||||
if (show) {
|
||||
const RoomTooltip = sdk.getComponent("rooms.RoomTooltip");
|
||||
return <RoomTooltip className="mx_BottomLeftMenu_tooltip" label={label} />;
|
||||
const Tooltip = sdk.getComponent("elements.Tooltip");
|
||||
return <Tooltip className="mx_BottomLeftMenu_tooltip" label={label} />;
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue